From 8c7987abed3acd873613327cb40facbfec2997f4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 5 Dec 2016 15:57:49 +0200 Subject: Add optional actualize argument to $path.normalize() --- tests/function/path/testscript | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/function') 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 -- cgit v1.1