summaryrefslogtreecommitdiff
path: root/tests/test-commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-commands.c')
-rw-r--r--tests/test-commands.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test-commands.c b/tests/test-commands.c
index 802002e861..272e3d12b7 100644
--- a/tests/test-commands.c
+++ b/tests/test-commands.c
@@ -146,7 +146,7 @@ static struct cmd_node keychain_key_node =
};
static int
-test_callback(struct cmd_element *cmd, struct vty *vty, int argc, const char *argv[])
+test_callback(const struct cmd_element *cmd, struct vty *vty, int argc, struct cmd_token *argv[])
{
int offset;
int rv;
@@ -162,7 +162,7 @@ test_callback(struct cmd_element *cmd, struct vty *vty, int argc, const char *ar
for (i = 0; i < argc; i++)
{
rv = snprintf(test_buf + offset, sizeof(test_buf) - offset, "%s'%s'",
- (i == 0) ? ": " : ", ", argv[i]);
+ (i == 0) ? ": " : ", ", argv[i]->arg);
if (rv < 0)
abort();
offset += rv;
@@ -317,7 +317,7 @@ test_run(struct prng *prng, struct vty *vty, const char *cmd, unsigned int edit_
printf(" '%s'\n", completions[j]);
XFREE(MTYPE_TMP, completions[j]);
}
- XFREE(MTYPE_VECTOR_INDEX, completions);
+ XFREE(MTYPE_TMP, completions);
}
vty->node = cnode->node;
@@ -332,7 +332,7 @@ test_run(struct prng *prng, struct vty *vty, const char *cmd, unsigned int edit_
for (j = 0; j < vector_active(descriptions); j++)
{
struct cmd_token *cmd = vector_slot(descriptions, j);
- printf(" '%s' '%s'\n", cmd->cmd, cmd->desc);
+ printf(" '%s' '%s'\n", cmd->text, cmd->desc);
}
vector_free(descriptions);
}