aboutsummaryrefslogtreecommitdiff
path: root/tests/mventry/testscript
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mventry/testscript')
-rw-r--r--tests/mventry/testscript51
1 files changed, 46 insertions, 5 deletions
diff --git a/tests/mventry/testscript b/tests/mventry/testscript
index ecd617a..c6cbf45 100644
--- a/tests/mventry/testscript
+++ b/tests/mventry/testscript
@@ -92,8 +92,8 @@
:
: If we are not cross-testing let's test renaming symlynks from and over. On
: Windows that involves mklink command usability test. If we fail to create a
-: trial link (say because we are running non-administrative console), then the
-: test group will be silently skipped.
+: trial link (say because we are not in the Developer Mode and are running
+: non-elevated console), then the test group will be silently skipped.
:
if ($test.target == $build.host)
{
@@ -104,8 +104,12 @@ if ($test.target == $build.host)
if cmd /C 'mklink b a' >- 2>- &?b && cat b >'yes'
lns = cmd /C 'mklink b a' >-
end
+
+ jnc = cmd /C 'mklink /J b a' >-
end
+ : symlink
+ :
if! $empty($lns)
{
: file
@@ -126,11 +130,11 @@ if ($test.target == $build.host)
: to
:
- : Make sure that if destination is a symlink it is get overwritten and it's
- : target stays intact.
+ : Make sure that if destination is a symlink it is get overwritten and
+ : it's target stays intact.
:
echo 'foo' >=a;
- $lns;
+ $lns &b;
echo 'bar' >=c &!c;
$* c b;
cat a >'foo';
@@ -182,6 +186,43 @@ if ($test.target == $build.host)
$* b c 2>- == 1
}
}
+
+ : junction
+ :
+ if! $empty($jnc)
+ {
+ : from
+ :
+ : Make sure that if source is a junction it refers the same target after
+ : rename.
+ :
+ mkdir -p a;
+ $jnc &!b;
+ $* b c &c;
+ touch a/b;
+ test -f c/b;
+ test -d b == 1
+
+ : to
+ :
+ : Make sure that if destination is a junction it is get overwritten and
+ : it's target stays intact.
+ :
+ mkdir -p a;
+ $jnc;
+ echo 'foo' >=c &!c;
+ $* c b &b;
+ cat b >'foo';
+ test -d a;
+ test -f c == 1
+
+ : over-existing-dir
+ :
+ mkdir a;
+ $jnc &b;
+ mkdir c;
+ $* b c 2>- == 1
+ }
}
: different-fs