From fdc8614c306e5b61224d1ab4b63c00c558dbb07e Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Mon, 16 Sep 2013 21:23:57 +0200 Subject: lib/command.c: rewrite command matching/parsing Add support for keyword commands. Signed-off-by: Christian Franke --- tests/main.c | 2 -- tests/test-commands.c | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/main.c b/tests/main.c index e0fbb4d5..2d8cb0c5 100644 --- a/tests/main.c +++ b/tests/main.c @@ -171,8 +171,6 @@ main (int argc, char **argv) /* OSPF vty inits. */ test_vty_init (); - sort_node (); - /* Change to the daemon program. */ if (daemon_mode && daemon (0, 0) < 0) { 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); } -- cgit v1.2.1