summaryrefslogtreecommitdiff
path: root/src/or/test.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-07-18 23:36:12 +0000
committerRoger Dingledine <arma@torproject.org>2005-07-18 23:36:12 +0000
commit7ac36a9a74f00f435c60ad7b410002e46ab8fcb8 (patch)
treecd71234a7a8f1b3799bb0b8f3486e568a81f49cf /src/or/test.c
parent8c657e4157b6c1e280fab85e46f7ef4afc54348f (diff)
downloadtor-7ac36a9a74f00f435c60ad7b410002e46ab8fcb8.tar.gz
tor-7ac36a9a74f00f435c60ad7b410002e46ab8fcb8.zip
unit tests to prove i didn't screw up
svn:r4602
Diffstat (limited to 'src/or/test.c')
-rw-r--r--src/or/test.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/test.c b/src/or/test.c
index 2e3e764e57..1199c8d5fc 100644
--- a/src/or/test.c
+++ b/src/or/test.c
@@ -748,6 +748,13 @@ test_util(void)
SMARTLIST_FOREACH(sl, char *, cp, tor_free(cp));
smartlist_clear(sl);
+ cp = smartlist_join_strings(sl, "XY", 0, NULL);
+ test_streq(cp, "");
+ tor_free(cp);
+ cp = smartlist_join_strings(sl, "XY", 1, NULL);
+ test_streq(cp, "XY");
+ tor_free(cp);
+
smartlist_split_string(sl, " z <> zhasd <> <> bnud<> ", "<>", SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
test_eq(3, smartlist_len(sl));
test_streq("z", smartlist_get(sl, 0));