summaryrefslogtreecommitdiffstats
path: root/tests/test-commands.c
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2013-09-30 12:27:51 +0000
committerDavid Lamparter <equinox@opensourcerouting.org>2014-04-01 20:21:41 +0200
commitcd40b329a2e4da882bcad0431c048c876bbeafbd (patch)
treecfbdec5a7559c6d3e56766797896a18809aa1746 /tests/test-commands.c
parente712d0e3667ffad8109ef8bce3ce01927ee95bb7 (diff)
downloadquagga-cd40b329a2e4da882bcad0431c048c876bbeafbd.tar.bz2
quagga-cd40b329a2e4da882bcad0431c048c876bbeafbd.tar.xz
lib/command.c: rewrite command matching/parsing
Add support for keyword commands. Includes new documentation for DEFUN() in lib/command.h, for preexisting features as well as new keyword specification. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'tests/test-commands.c')
-rw-r--r--tests/test-commands.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/test-commands.c b/tests/test-commands.c
index e2f40c6a..18b3b50d 100644
--- a/tests/test-commands.c
+++ b/tests/test-commands.c
@@ -233,8 +233,6 @@ test_init(void)
cmd->daemon = 0;
cmd->func = test_callback;
}
- sort_node();
-
test_load();
vty_init_vtysh();
}
@@ -340,8 +338,8 @@ test_run(struct prng *prng, struct vty *vty, const char *cmd, unsigned int edit_
{
for (j = 0; j < vector_active(descriptions); j++)
{
- struct desc *cmd = vector_slot(descriptions, j);
- printf(" '%s' '%s'\n", cmd->cmd, cmd->str);
+ struct cmd_token *cmd = vector_slot(descriptions, j);
+ printf(" '%s' '%s'\n", cmd->cmd, cmd->desc);
}
vector_free(descriptions);
}