aboutsummaryrefslogtreecommitdiff
path: root/tests/function/path/testscript
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-12-01 14:59:32 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-12-01 14:59:32 +0200
commit6cb960121c4195dd9d12c92d4f3ff2819fad143e (patch)
tree5a23232c224a1fbb4cfc38d077de65099adf7ea1 /tests/function/path/testscript
parent08eea971d2d3170ca357935644483dc520f46173 (diff)
Add path.canonicalize() function
Diffstat (limited to 'tests/function/path/testscript')
-rw-r--r--tests/function/path/testscript13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/function/path/testscript b/tests/function/path/testscript
index 8b527e3..e1f0a36 100644
--- a/tests/function/path/testscript
+++ b/tests/function/path/testscript
@@ -10,6 +10,17 @@ else
s = '\'
end
+: canonicalize
+:
+{
+ $* <'print $canonicalize([path] a/b)' >"a$(s)b" : path
+ $* <'print $canonicalize([paths] a/b a/c)' >"a$(s)b a$(s)c" : paths
+ $* <'print $canonicalize([dir_path] a/b)' >"a$(s)b$s" : dir-path
+ $* <'print $canonicalize([dir_paths] a/b a/c/)' >"a$(s)b$s a$(s)c$s" : dir-paths
+ $* <'print $path.canonicalize(a/b)' >"a$(s)b" : untyped
+ $* <'print $path.canonicalize(a/b/ a/c)' >"a$(s)b$s a$(s)c" : mixed
+}
+
: normalize
:
{
@@ -18,7 +29,7 @@ end
$* <'print $normalize([dir_path] a/../b)' >"b$s" : dir-path
$* <'print $normalize([dir_paths] a/../b a/../c/)' >"b$s c$s" : dir-paths
$* <'print $path.normalize(a/../b)' >"b" : untyped
- $* <'print $path.normalize(a/../b/ a/../b)' >"b$s b" : mixed
+ $* <'print $path.normalize(a/../b/ a/../c)' >"b$s c" : mixed
}
: invalid-path