diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/guile/cantius-test.scm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/guile/cantius-test.scm b/tests/guile/cantius-test.scm index 0e4b2ca..e497bfe 100644 --- a/tests/guile/cantius-test.scm +++ b/tests/guile/cantius-test.scm @@ -220,3 +220,20 @@ (tu:test-assert (eval '(begin (thread-terminate! server-thread) (close server-sock)) (test-env 'nonfree-site)))) + +(tu:test-group "normalize-path" + (tu:test-equal "a/b/c/d" + ((@ (cantius) normalize-path) "a//b/./c//c1/../d")) + + (tu:test-equal "." + ((@ (cantius) normalize-path) "aa/bb/cc/../../..")) + + (tu:test-equal "/" + ((@ (cantius) normalize-path) "/dd/ee/ff/../../..")) + + (tu:test-equal "/../../g/h/i" + ((@ (cantius) normalize-path) + "/ignored0/../ignored1/../.././ignored2/../../g/h/i")) + + (tu:test-equal "../j/k/l" + ((@ (cantius) normalize-path) "../j/k/l"))) |