Summary Files Commits Branches @commit @diff @stats
path: root / uri_test.c
diff options
context:
space:
mode:
Commit6880bf722d254d12e8236c78a7d858b9c94deee6 (patch)
Author
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2020-05-29 23:44:13 +0200
Committer
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2020-05-29 23:47:40 +0200
Files5e499f363b671cf51718db98ad7e08ae3f51f8a6 /uri_test.c
goodwolf-6880bf722d254d12e8236c78a7d858b9c94deee6.tar
goodwolf-6880bf722d254d12e8236c78a7d858b9c94deee6.tar.gz
goodwolf-6880bf722d254d12e8236c78a7d858b9c94deee6.zip
Parent128c98567559d443bbb184dff247090eb5b28a8d (diff)
uri.c: Add support for relative paths
1 files changed, 4 insertions, 1 deletions
-rw-r--r--uri_test.c5
diff --git a/uri_test.c b/uri_test.c
index 5881120..a153817 100644
--- a/uri_test.c
+++ b/uri_test.c
@@ -29,10 +29,13 @@ badwolf_ensure_uri_scheme_test(void)
{fallback, "", TRUE},
{"http:///dev/null", "/dev/null", FALSE},
{"file:///dev/null", "/dev/null", TRUE},
+ {"http:///usr/../dev/null", "/usr/../dev/null", FALSE},
+ {"file:///dev/null", "/usr/../dev/null", TRUE},
{"http://example.org", "example.org", FALSE},
{"http://example.org", "example.org", TRUE},
{"http://", "http://", FALSE},
- {"http://", "http://", TRUE} //
+ {"http://", "http://", TRUE},
+ {"http://badwolf.c", "badwolf.c", FALSE} //
};
for(size_t i = 0; i < sizeof(cases) / sizeof(cases[0]); i++)