From 955afeb419ed02a078b45312949767692751274c Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sun, 15 Mar 2020 17:02:22 +0300 Subject: Fix ln builtin not to complete relative target against working directory Now it preserves the relative path when creates a symlink and completes it against the link directory when creates a hardlink or a copy. --- tests/builtin/ln.testscript | 6 +++--- tests/dir-iterator/testscript | 2 +- tests/mventry/testscript | 2 +- tests/wildcard/testscript | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/builtin/ln.testscript b/tests/builtin/ln.testscript index c12999f..051d0dc 100644 --- a/tests/builtin/ln.testscript +++ b/tests/builtin/ln.testscript @@ -112,7 +112,7 @@ $* -u >'option -u' 2>"ln: unknown option '-u'" == 1 { touch a; - $* -s a b/c >>/~%EOO% 2>>/~%EOE% != 0 + $* -s $~/a b/c >>/~%EOO% 2>>/~%EOE% != 0 %create .+/b/c true% EOO %( @@ -185,7 +185,7 @@ $* -u >'option -u' 2>"ln: unknown option '-u'" == 1 { mkdir a; - $* -s a b/c >>/~%EOO% 2>>/~%EOE% != 0 + $* -s $~/a b/c >>/~%EOO% 2>>/~%EOE% != 0 %create .+/b/c true% EOO %( @@ -205,7 +205,7 @@ $* -u >'option -u' 2>"ln: unknown option '-u'" == 1 touch a; mkdir b c; - $* -s a b c/ >>/~%EOO% &c/a &c/b; + $* -s ../a ../b c/ >>/~%EOO% &c/a &c/b; %create .+/c/a true% %create .+/c/a false% %create .+/c/b true% diff --git a/tests/dir-iterator/testscript b/tests/dir-iterator/testscript index ec7338d..03ed164 100644 --- a/tests/dir-iterator/testscript +++ b/tests/dir-iterator/testscript @@ -24,7 +24,7 @@ $* a >"dir b" if ($test.target == $build.host) { +if ($cxx.target.class != 'windows') - lnf = ln -s wd/t wd/l &wd/l + lnf = ^ln -s t wd/l &wd/l lnd = $lnf else echo 'yes' >=t diff --git a/tests/mventry/testscript b/tests/mventry/testscript index 54a3acc..61ef871 100644 --- a/tests/mventry/testscript +++ b/tests/mventry/testscript @@ -98,7 +98,7 @@ if ($test.target == $build.host) { +if ($cxx.target.class != 'windows') - lnf = ln -s t l &l + lnf = ^ln -s t l &l lnd = $lnf else echo 'yes' >=t diff --git a/tests/wildcard/testscript b/tests/wildcard/testscript index 3590aa3..5f6a767 100644 --- a/tests/wildcard/testscript +++ b/tests/wildcard/testscript @@ -650,7 +650,7 @@ { mkdir a; touch --no-cleanup a/b; - ln -s a/b a/l; + ^ln -s b a/l &a/l; rm a/b; touch a/c; -- cgit v1.1