aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/testscript.cli3
-rw-r--r--tests/bash/testscript2
-rw-r--r--tests/cc/modules/modules.testscript4
-rw-r--r--tests/test/script/builtin/ln.testscript4
4 files changed, 7 insertions, 6 deletions
diff --git a/doc/testscript.cli b/doc/testscript.cli
index d39893a..6b47dad 100644
--- a/doc/testscript.cli
+++ b/doc/testscript.cli
@@ -2413,7 +2413,8 @@ If the last argument does not end with a directory separator, then the first
synopsis is assumed where \c{ln} creates the symbolic link to \i{target-path}
at \i{link-path} failing if the \i{target-path} filesystem entry does not
exist, \i{link-path} filesystem entry already exists or more than two arguments
-are specified.
+are specified. If \i{target-path} is relative, then it is assumed to be
+relative to the \i{link-path}'s directory.
If the last argument ends with a directory separator, then the second synopsis
is assumed where \c{ln} creates one or more symbolic links to \i{target-path}
diff --git a/tests/bash/testscript b/tests/bash/testscript
index 09bd989..1e5665c 100644
--- a/tests/bash/testscript
+++ b/tests/bash/testscript
@@ -182,7 +182,7 @@ if ($test.target == $build.host && $build.host.class != 'windows')
# Test execution via symlink.
#
mkdir bin;
- ln -s tmp/bin/driver bin/driver;
+ ln -s ../tmp/bin/driver bin/driver;
bin/driver >'sub';
# Test execution via PATH.
diff --git a/tests/cc/modules/modules.testscript b/tests/cc/modules/modules.testscript
index b603871..a43cc57 100644
--- a/tests/cc/modules/modules.testscript
+++ b/tests/cc/modules/modules.testscript
@@ -109,7 +109,7 @@ $* test clean <<EOI
: Test subdirectory.
:
mkdir foo;
- ln -s ../../core.mxx foo/core.mxx;
+ ln -s ../../../core.mxx foo/core.mxx;
ln -s ../core.mxx ../../core.cxx ../../driver.cxx ./;
$* test clean <'exe{test}: cxx{driver core} mxx{core} foo/mxx{core}'
@@ -136,7 +136,7 @@ $* test clean <<EOI
: Secondary score: sub/core.mxx vs ext-core.mxx (stronger separator).
:
mkdir sub;
- ln -s ../../core.mxx ../../core.cxx sub/;
+ ln -s ../../../core.mxx ../../../core.cxx sub/;
ln -s ../ext-core.mxx ../../driver.cxx ./;
$* test clean <'exe{test}: cxx{driver} mxx{ext-core} sub/{mxx cxx}{core}'
diff --git a/tests/test/script/builtin/ln.testscript b/tests/test/script/builtin/ln.testscript
index 2838b22..542b0c7 100644
--- a/tests/test/script/builtin/ln.testscript
+++ b/tests/test/script/builtin/ln.testscript
@@ -57,7 +57,7 @@
$c <<EOI && $b
mkdir b c;
touch a b/c;
- ln -s a b c/
+ ln -s ../a ../b c/
EOI
: no-cleanup
@@ -65,7 +65,7 @@
$c <<EOI && $b
mkdir b c;
touch a b/c;
- ln -s --no-cleanup a b c/;
+ ln -s --no-cleanup ../a ../b c/;
rm -r c/a c/b
EOI
}