aboutsummaryrefslogtreecommitdiff
path: root/tests/dir-iterator
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-03-10 14:47:02 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-03-10 14:47:02 +0300
commit69d3b7af920cb2a02a692abca7402b59a1ea162c (patch)
tree3181dc8d8e909b623245d80a780c901dfd0c8fa2 /tests/dir-iterator
parentdcccba655fe848564e961b3f285ce3a82d3ac73a (diff)
Fix directory symlink tests failing on Windows in Developer Mode
Diffstat (limited to 'tests/dir-iterator')
-rw-r--r--tests/dir-iterator/testscript24
1 files changed, 10 insertions, 14 deletions
diff --git a/tests/dir-iterator/testscript b/tests/dir-iterator/testscript
index 720622f..ec7338d 100644
--- a/tests/dir-iterator/testscript
+++ b/tests/dir-iterator/testscript
@@ -24,11 +24,13 @@ $* a >"dir b"
if ($test.target == $build.host)
{
+if ($cxx.target.class != 'windows')
- lns = ln -s wd/t wd/l &wd/l
+ lnf = ln -s wd/t wd/l &wd/l
+ lnd = $lnf
else
echo 'yes' >=t
if cmd /C 'mklink l t' >- 2>- &?l && cat l >'yes'
- lns = cmd /C 'mklink wd\l t' &wd/l >-
+ lnf = cmd /C 'mklink wd\l t' &wd/l >-
+ lnd = cmd /C 'mklink /D wd\l t' &wd/l >-
end
jnc = cmd /C 'mklink /J wd\l wd\t' &wd/l >-
@@ -36,7 +38,7 @@ if ($test.target == $build.host)
: symlink
:
- if! $empty($lns)
+ if! $empty($lnf)
{
: file
:
@@ -44,7 +46,7 @@ if ($test.target == $build.host)
+mkdir wd
+touch --no-cleanup wd/t
+touch wd/f
- +$lns
+ +$lnf
+$* wd >>~%EOO%
%(reg f|reg t|sym reg l)%{3}
EOO
@@ -60,16 +62,10 @@ if ($test.target == $build.host)
+mkdir wd
+mkdir --no-cleanup wd/t
+mkdir wd/d
- +$lns
-
- # Note that this test may fail on Windows (see symlinks known issues in
- # libbutl/filesystem.mxx).
- #
- +if ($cxx.target.class != 'windows')
- $* wd >>~%EOO%
- %(dir d|dir t|sym dir l)%{3}
- EOO
- end
+ +$lnd
+ +$* wd >>~%EOO%
+ %(dir d|dir t|sym dir l)%{3}
+ EOO
+rmdir wd/t