mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 13:56:37 +02:00
api: add special value - (hyphen-minus) in options of function command_options to prevent execution of commands (issue #2199)
This commit is contained in:
@@ -182,6 +182,15 @@ TEST(CoreInput, Data)
|
||||
RECORD_CHECK_MSG("core.test", "", "line2", NULL);
|
||||
LONGS_EQUAL(2, record_count_messages ());
|
||||
|
||||
/* on core buffer: valid command but with commands disabled */
|
||||
TEST_INPUT_DATA(WEECHAT_RC_ERROR, gui_buffers, "/print core\n/print line2", "-", 0, 0);
|
||||
RECORD_CHECK_MSG("core.weechat", "=!=", "You cannot write text in this buffer", NULL);
|
||||
LONGS_EQUAL(1, record_count_messages ());
|
||||
|
||||
/* on test buffer: valid command but with commands disabled */
|
||||
TEST_INPUT_DATA(WEECHAT_RC_OK, buffer, "/print core\n/print line2", "-", 0, 0);
|
||||
RECORD_CHECK_NO_MSG();
|
||||
|
||||
gui_buffer_close (buffer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user