mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-22 20:06:21 +00:00
Don't allow /alias to overwrite standard command
This commit is contained in:
@@ -101,9 +101,11 @@ void cmd_alias_add_shows_message_when_exists(void **state)
|
||||
CommandHelp *help = malloc(sizeof(CommandHelp));
|
||||
gchar *args[] = { "add", "hc", "/help commands", NULL };
|
||||
|
||||
cmd_init();
|
||||
prefs_add_alias("hc", "/help commands");
|
||||
cmd_autocomplete_add("/hc");
|
||||
|
||||
expect_cons_show("Command alias /hc already exists.");
|
||||
expect_cons_show("Command or alias /hc already exists.");
|
||||
|
||||
gboolean result = cmd_alias(args, *help);
|
||||
assert_true(result);
|
||||
|
||||
Reference in New Issue
Block a user