diff options
author | Rob Landley <rob@landley.net> | 2019-10-26 17:22:55 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-10-26 17:22:55 -0500 |
commit | 49feb50f22e2db90556f79dbc0de36f8ecb8b521 (patch) | |
tree | ce6bc1fd437b472830418e206a89333f76142888 /tests | |
parent | dec46177dbe9cd5cde877611a03e53be51f37ab2 (diff) | |
download | toybox-49feb50f22e2db90556f79dbc0de36f8ecb8b521.tar.gz |
Add ln -r and relative_path() to lib, plus test.
And a few small cleanups while I was there.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/ln.test | 10 |
1 files changed, 10 insertions, 0 deletions
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 |