diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-12-05 15:57:49 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-12-05 15:57:49 +0200 |
commit | 8c7987abed3acd873613327cb40facbfec2997f4 (patch) | |
tree | f9a32ffb176f76defaa913093f0b20c4ec1956e3 /tests/function | |
parent | 54870fb76b5f59cc2e6d69a8c7a8ef17853a0029 (diff) |
Add optional actualize argument to $path.normalize()
Diffstat (limited to 'tests/function')
-rw-r--r-- | tests/function/path/testscript | 20 |
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 |