diff options
author | James Booth <boothj5@gmail.com> | 2014-01-25 01:39:12 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-01-25 01:39:12 +0000 |
commit | 4bd06a5d8748b0096845cecd2ad24da7a194aff0 (patch) | |
tree | f2d24d2a31e2625d9785371e64a40259fe829f21 /tests/test_cmd_alias.c | |
parent | 17f40b76ee829c806bbd995aed73c3c7531beb26 (diff) | |
download | profani-tty-4bd06a5d8748b0096845cecd2ad24da7a194aff0.tar.gz |
Don't allow /alias to overwrite standard command
Diffstat (limited to 'tests/test_cmd_alias.c')
-rw-r--r-- | tests/test_cmd_alias.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_cmd_alias.c b/tests/test_cmd_alias.c index 6ca20290..27fd806b 100644 --- a/tests/test_cmd_alias.c +++ b/tests/test_cmd_alias.c @@ -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); |