path: root/test
diff options
authorAlfred E. Heggestad <>2016-11-27 18:07:42 +0100
committerAlfred E. Heggestad <>2016-11-27 18:07:42 +0100
commit1203abd362a212b6cb6a02ff54f466d3a23dbf83 (patch)
tree6d3db4240e76a90def031b1bc2c312b09643697d /test
parente1e5337644671c7df1703a0916242868bcccd1fc (diff)
cmd: check for duplicated entries
- registering duplicate short commands is no longer possible - disable a couple of short commands, use long command instead (short commands should only be used for very frequently used things) - menu: properly register/unregister digit handlers for active calls thanks to Juha Heinanen for reporting an issue with the 'a' key
Diffstat (limited to 'test')
1 files changed, 3 insertions, 0 deletions
diff --git a/test/cmd.c b/test/cmd.c
index 06f35b6..ae3838b 100644
--- a/test/cmd.c
+++ b/test/cmd.c
@@ -63,6 +63,9 @@ int test_cmd(void)
err = cmd_register(&commands, cmdv, ARRAY_SIZE(cmdv));
ASSERT_EQ(0, err);
+ /* it is not possible to register same block twice */
+ ASSERT_EQ(EALREADY, cmd_register(&commands, cmdv, ARRAY_SIZE(cmdv)));
/* issue a different command */
err = cmd_process(&commands, &ctx, 'h', &pf_null, &test);
ASSERT_EQ(0, err);