summaryrefslogtreecommitdiff
path: root/src/test/test_util.c
diff options
context:
space:
mode:
authorEsteban Manchado Velázquez <emanchado@demiurgo.org>2012-02-11 22:43:42 +0100
committerNick Mathewson <nickm@torproject.org>2012-03-08 20:49:26 -0500
commit9ae7d511f4d55cf47f0d28bc121bb0460067793a (patch)
tree5e681cdbe658dbe9d18a3e916268cbbda43eb955 /src/test/test_util.c
parentfa1d6f812c31d438ecd81f6f9e57a1982fa5ba52 (diff)
downloadtor-9ae7d511f4d55cf47f0d28bc121bb0460067793a.tar.gz
tor-9ae7d511f4d55cf47f0d28bc121bb0460067793a.zip
Add extra tests for get_parent_directory
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r--src/test/test_util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c
index f5adad9390..600bdd5b47 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -1667,12 +1667,18 @@ test_util_parent_dir(void *ptr)
T("/home/wombat", 0, "/home/wombat/knish/");
T("/home/wombat", 0, "/home/wombat/knish///");
T("./home/wombat", 0, "./home/wombat/knish/");
+#if 0
+ T("/", 0, "/home");
+ T("/", 0, "/home//");
+#endif
T(".", 0, "./wombat");
T(".", 0, "./wombat/");
T(".", 0, "./wombat//");
T("wombat", 0, "wombat/foo");
T("wombat/..", 0, "wombat/../foo");
T("wombat/../", 0, "wombat/..//foo"); /* Is this correct? */
+ T("wombat/.", 0, "wombat/./foo");
+ T("wombat/./", 0, "wombat/.//foo"); /* Is this correct? */
T("wombat", 0, "wombat/..//");
T("wombat", 0, "wombat/foo/");
T("wombat", 0, "wombat/.foo");