nserver

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit c6fe16189606f39ad31fac67a2a179a29bcf3b8f
parent a8d9b5ce9b1e01d8be260d6d2df59516eb0f8473
Author: rsiddharth <s@ricketyspace.net>
Date:   Mon, 16 Dec 2019 20:50:30 -0500

nserver: ncmd_tests.c: Update test_call_function.

* nserver/tests/ncmd_tests.c (test_call_function): Delete ham and
beef too.

Diffstat:
nserver/tests/ncmd_tests.c | 15+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git a/nserver/tests/ncmd_tests.c b/nserver/tests/ncmd_tests.c @@ -281,6 +281,21 @@ char *test_call_function() || strcmp(msg, "beef\nham\n") == 0, "call function failed"); + // delete ham and beef. + char *ham_delete = "/delete ham"; + parts = cmd_parts(ham_delete); + mu_assert(parts != NULL, "cmd_parts failed"); + rc = call_function(NS_DELETE, parts, msg); + mu_assert(rc == 0, "call function failed"); + mu_assert(strcmp(msg, "OK\n") == 0, "call function failed"); + + char *beef_delete = "/delete beef"; + parts = cmd_parts(beef_delete); + mu_assert(parts != NULL, "cmd_parts failed"); + rc = call_function(NS_DELETE, parts, msg); + mu_assert(rc == 0, "call function failed"); + mu_assert(strcmp(msg, "OK\n") == 0, "call function failed"); + return NULL; }