summaryrefslogtreecommitdiff
path: root/src/or/test.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-03-20 01:21:19 +0000
committerNick Mathewson <nickm@torproject.org>2004-03-20 01:21:19 +0000
commitb0ef4e1143619e0beb2388f523c7dce39d5bc6ed (patch)
tree9bd27325d13b3ab75283660bcd992dfe319fdefc /src/or/test.c
parent1dca07fc51bf977f4d0f60f5cb36e9aab6d74da4 (diff)
downloadtor-b0ef4e1143619e0beb2388f523c7dce39d5bc6ed.tar.gz
tor-b0ef4e1143619e0beb2388f523c7dce39d5bc6ed.zip
Use strmap code for client DNS.
svn:r1309
Diffstat (limited to 'src/or/test.c')
-rw-r--r--src/or/test.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/test.c b/src/or/test.c
index b4810d2e4d..af11a4b7f0 100644
--- a/src/or/test.c
+++ b/src/or/test.c
@@ -539,6 +539,16 @@ void test_strmap() {
/* Clean up after ourselves. */
strmap_free(map, NULL);
+
+ /* Now try some lc functions. */
+ map = strmap_new();
+ strmap_set_lc(map,"Ab.C", (void*)1);
+ test_eq(strmap_get(map,"ab.c"), (void*)1);
+ test_eq(strmap_get_lc(map,"AB.C"), (void*)1);
+ test_eq(strmap_get(map,"AB.C"), NULL);
+ test_eq(strmap_remove_lc(map,"aB.C"), (void*)1);
+ test_eq(strmap_get_lc(map,"AB.C"), NULL);
+ strmap_free(map,NULL);
}
void test_onion() {