aboutsummaryrefslogtreecommitdiff
path: root/tests/function
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-12-05 14:16:26 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-12-08 14:26:22 +0300
commita56c7a5d4e707e51fea407d44bd751426bfdc8f5 (patch)
tree3bacfbd63e89830f9d67f3ecf1aa5d124de36656 /tests/function
parentd38dbf711c9532eea99607368278a8396b3db667 (diff)
Redo $normalize(true) as separate $actualize()
Diffstat (limited to 'tests/function')
-rw-r--r--tests/function/path/testscript21
1 files changed, 12 insertions, 9 deletions
diff --git a/tests/function/path/testscript b/tests/function/path/testscript
index 52b4138..ad76513 100644
--- a/tests/function/path/testscript
+++ b/tests/function/path/testscript
@@ -3,7 +3,9 @@
.include ../../common.testscript
-s = ($cxx.target.class != 'windows' ? '/' : '\')
+posix = ($cxx.target.class != 'windows')
+
+s = ($posix ? '/' : '\')
: canonicalize
:
@@ -25,16 +27,17 @@ s = ($cxx.target.class != 'windows' ? '/' : '\')
$* <'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($out_base/foo, true)' >~'/.+\\Foo/'
- }
+: actualize
+:
+if! $posix
+{
+ mkdir Foo;
+ $* <'print $path.actualize($out_base/foo)' >~'/.+\\Foo/'
}
+
: directory
:
{
@@ -103,7 +106,7 @@ s = ($cxx.target.class != 'windows' ? '/' : '\')
: invalid-path
:
-p = ($cxx.target.class != 'windows' ? /../foo : 'c:/../foo');
+p = ($posix ? /../foo : 'c:/../foo');
$* <"\$path.normalize\('$p')" 2>>"EOE" != 0
error: invalid path: '$p'
<stdin>:1:2: info: while calling path.normalize\(<untyped>\)