From 49feb50f22e2db90556f79dbc0de36f8ecb8b521 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 26 Oct 2019 17:22:55 -0500 Subject: Add ln -r and relative_path() to lib, plus test. And a few small cleanups while I was there. --- tests/ln.test | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/ln.test') diff --git a/tests/ln.test b/tests/ln.test index c326c2e1..6a5787f7 100755 --- a/tests/ln.test +++ b/tests/ln.test @@ -55,6 +55,7 @@ rm -rf file dir slink testing "-t" "ln -st . one/two three && readlink two three" "one/two\nthree\n" \ "" "" +rm -f two three touch file1 file2 && mkdir dir testing "create_multiple_hardlinks" "ln file* dir/ && @@ -78,3 +79,12 @@ testing "create_hardlink_and_remove_sourcefile" "ln file hlink && [ file -ef hlink ] && rm file && [ -f hlink ] && echo 'yes'" \ "yes\n" "" "" rm -f file hlink + +mkdir -p one/two +ln -s . circular +mkdir -p three +echo hello > three/four +testing "ln -r" \ + "ln -sr circular/three/../three/four one/two/five && cat one/two/five" \ + "hello\n" "" "" +rm -rf one three circular -- cgit v1.2.3