aboutsummaryrefslogtreecommitdiff
path: root/tests/function
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-12-05 15:57:49 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-12-05 15:57:49 +0200
commit8c7987abed3acd873613327cb40facbfec2997f4 (patch)
treef9a32ffb176f76defaa913093f0b20c4ec1956e3 /tests/function
parent54870fb76b5f59cc2e6d69a8c7a8ef17853a0029 (diff)
Add optional actualize argument to $path.normalize()
Diffstat (limited to 'tests/function')
-rw-r--r--tests/function/path/testscript20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/function/path/testscript b/tests/function/path/testscript
index 066a6c8..8467bce 100644
--- a/tests/function/path/testscript
+++ b/tests/function/path/testscript
@@ -4,11 +4,7 @@
.include ../../common.test
-if ($cxx.target.class != windows) # @@ TMP ternarry
- s = '/'
-else
- s = '\'
-end
+s = ($cxx.target.class != windows ? '/' : '\')
: canonicalize
:
@@ -30,15 +26,19 @@ end
$* <'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/../c)' >"b$s c" : mixed
+
+ : actualize
+ :
+ if ($cxx.target.class == windows)
+ {
+ mkdir Foo;
+ $* <"print \$path.normalize\('$~/foo', true)" >"$~\\Foo"
+ }
}
: invalid-path
:
-if ($cxx.target.class != windows) # @@ TMP ternarry
- p = /../foo
-else
- p = c:/../foo
-end;
+p = ($cxx.target.class != windows ? /../foo : 'c:/../foo');
$* <"\$path.normalize\('$p')" 2>>"EOE" != 0
error: invalid path: '$p'
EOE