[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] unit tests to prove i didn"t screw up
Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or
Modified Files:
test.c
Log Message:
unit tests to prove i didn't screw up
Index: test.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/test.c,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -d -r1.185 -r1.186
--- test.c 15 Jul 2005 19:31:11 -0000 1.185
+++ test.c 18 Jul 2005 23:36:12 -0000 1.186
@@ -748,6 +748,13 @@
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));