diff options
author | Roger Dingledine <arma@torproject.org> | 2003-11-12 19:34:34 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-11-12 19:34:34 +0000 |
commit | f5829aa723fddb9e48f07a8e9830924c1bd8f5fb (patch) | |
tree | f0bbbf7cbf9f9346440f233c772fc0d6ced366d5 /src/or/test.c | |
parent | 9358381d83d0d27db58c94cf01ab45c16292d378 (diff) | |
download | tor-f5829aa723fddb9e48f07a8e9830924c1bd8f5fb.tar tor-f5829aa723fddb9e48f07a8e9830924c1bd8f5fb.tar.gz |
lay groundwork for EntryNodes and ExitNodes
svn:r805
Diffstat (limited to 'src/or/test.c')
-rw-r--r-- | src/or/test.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/or/test.c b/src/or/test.c index a653c179b..278323283 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -464,6 +464,21 @@ test_util() { test_eq((time_t) 1076393695UL, tor_timegm(&a_time)); } +void test_onion() { + char **names; + int i,num; + + names = parse_nickname_list(" foo bar baz quux ", &num); + test_eq(num,4); + test_streq(names[0],"foo"); + test_streq(names[1],"bar"); + test_streq(names[2],"baz"); + test_streq(names[3],"quux"); + for(i=0;i<num;i++) + tor_free(names[i]); + tor_free(names); +} + void test_onion_handshake() { /* client-side */ @@ -693,6 +708,7 @@ main(int c, char**v){ puts("\n========================= Util ============================"); test_util(); puts("\n========================= Onion Skins ====================="); + test_onion(); test_onion_handshake(); puts("\n========================= Directory Formats ==============="); test_dir_format(); |