diff options
author | rsiddharth <s@ricketyspace.net> | 2019-11-02 11:59:56 -0400 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2020-04-17 20:56:34 -0400 |
commit | a485240c332beba45ee67454432fcc55ef9669b9 (patch) | |
tree | 6cbeedfd0cf8cb5df7165b1447db78c5adabee9d /nserver/tests/protocol_tests.c | |
parent | 1edf1d1f7f86301f5c37857cd2c521e0e1522e6e (diff) |
nserver: protocol: Define ssdump.
* nserver/src/protocol.c (ssdump): New function.
* nserver/tests/protocol_tests.c (test_ssdump): New test.
(all_tests): Add test_ssdump.
Diffstat (limited to 'nserver/tests/protocol_tests.c')
-rw-r--r-- | nserver/tests/protocol_tests.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/nserver/tests/protocol_tests.c b/nserver/tests/protocol_tests.c index bc8a3db..96450be 100644 --- a/nserver/tests/protocol_tests.c +++ b/nserver/tests/protocol_tests.c @@ -58,6 +58,34 @@ char *test_ssmean() return NULL; } +char *test_ssdump() +{ + char *dstr = NULL; + + dstr = ssdump("crimson"); + mu_assert(dstr != NULL, "ssdump failed 0"); + debug("DUMP: %s", dstr); + + // clean up. + free(dstr); + + dstr = ssdump("/vermilion"); + mu_assert(dstr != NULL, "ssdump failed 1"); + debug("DUMP: %s", dstr); + + // clean up. + free(dstr); + + dstr = ssdump("/ruby"); + mu_assert(dstr == NULL, "ssdump failed 2"); + debug("DUMP: %s", dstr); + + // clean up. + free(dstr); + + return NULL; +} + char *test_ssdelete() { int rc = 0; @@ -81,6 +109,7 @@ char *all_tests() mu_run_test(test_sscreate); mu_run_test(test_sssample); mu_run_test(test_ssmean); + mu_run_test(test_ssdump); mu_run_test(test_ssdelete); return NULL; |