mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 14:56:39 +02:00
core: fix execution of empty command name
The strings "/" and "/ " are not considered as valid commands any more.
This commit is contained in:
@@ -1214,11 +1214,25 @@ TEST(String, Input)
|
||||
|
||||
/* string_input_for_buffer */
|
||||
POINTERS_EQUAL(NULL, string_input_for_buffer (NULL));
|
||||
POINTERS_EQUAL(NULL, string_input_for_buffer ("/"));
|
||||
POINTERS_EQUAL(NULL, string_input_for_buffer ("/abc"));
|
||||
str = strdup ("");
|
||||
STRCMP_EQUAL(str, string_input_for_buffer (str));
|
||||
free (str);
|
||||
str = strdup ("/");
|
||||
STRCMP_EQUAL(str, string_input_for_buffer (str));
|
||||
free (str);
|
||||
str = strdup ("/ ");
|
||||
STRCMP_EQUAL(str, string_input_for_buffer (str));
|
||||
free (str);
|
||||
str = strdup ("/ abc");
|
||||
STRCMP_EQUAL(str, string_input_for_buffer (str));
|
||||
free (str);
|
||||
str = strdup ("/ /");
|
||||
STRCMP_EQUAL(str, string_input_for_buffer (str));
|
||||
free (str);
|
||||
str = strdup ("/*");
|
||||
STRCMP_EQUAL(str, string_input_for_buffer (str));
|
||||
free (str);
|
||||
str = strdup ("abc");
|
||||
STRCMP_EQUAL(str, string_input_for_buffer (str));
|
||||
free (str);
|
||||
|
||||
Reference in New Issue
Block a user