aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-09-30 13:04:56 -0500
committerRob Landley <rob@landley.net>2019-09-30 13:04:56 -0500
commit98d6e0cbf63822f9107a899e9443402cd64dd90d (patch)
tree2199376e0204b0ae0fca4c59672d943061374b0d
parent14f5f890021b03211dc2228fb22b191e2671dd2d (diff)
downloadtoybox-98d6e0cbf63822f9107a899e9443402cd64dd90d.tar.gz
Test ln -t
-rwxr-xr-xtests/ln.test8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/ln.test b/tests/ln.test
index 9effcbd6..c326c2e1 100755
--- a/tests/ln.test
+++ b/tests/ln.test
@@ -20,7 +20,7 @@ testing "force_create_hardlink" "ln -f file hlink &&
[ file -ef hlink ] && cat hlink 2>/dev/null" "file1\n" "" ""
echo slink1 > slink
-testing "force_create_softlink" "ln -f -s file slink &&
+testing "force_create_symlink" "ln -f -s file slink &&
[ -L slink ] && readlink slink" "file\n" "" ""
rm slink hlink
@@ -31,7 +31,7 @@ testing "preserves_hardlinks" "ln file hlink 2>/dev/null || echo 'yes'" \
echo slink1 > slink
set +e
-testing "preserves_softlinks" "ln -s file slink 2>/dev/null || echo 'yes'" \
+testing "preserves_symlinks" "ln -s file slink 2>/dev/null || echo 'yes'" \
"yes\n" "" ""
rm slink hlink
@@ -51,9 +51,11 @@ testing "-T acts like -n" "ln -s dir slink &&
rm slink
testing "-T with dir" "ln -Ts file dir 2>/dev/null || echo yes" "yes\n" "" ""
-
rm -rf file dir slink
+testing "-t" "ln -st . one/two three && readlink two three" "one/two\nthree\n" \
+ "" ""
+
touch file1 file2 && mkdir dir
testing "create_multiple_hardlinks" "ln file* dir/ &&
[ file1 -ef dir/file1 -a file2 -ef dir/file2 ] && echo 'yes'" "yes\n" "" ""