aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-04-08 20:50:10 -0500
committerRob Landley <rob@landley.net>2018-04-08 20:50:10 -0500
commitcd3f81ebe5c82f1fd5f610b0f2e0fa07ac27903e (patch)
tree68b7f7729971aed2e43ae0f1dbdecd7bba3c97b4 /tests
parent4f81242e384930a683b3591bc5a634fa22dda8ca (diff)
downloadtoybox-cd3f81ebe5c82f1fd5f610b0f2e0fa07ac27903e.tar.gz
Add readlink -m to show where a missing path would be.
Note: ubuntu will show -m through a file, this treat that as error.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/readlink.test3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/readlink.test b/tests/readlink.test
index 48104e58..52121770 100755
--- a/tests/readlink.test
+++ b/tests/readlink.test
@@ -48,6 +48,9 @@ testing "-f link/missing" "readlink -f dir/boing" \
"$APWD/sub/boing\n" "" ""
testing "-f /dev/null/file" \
"readlink -f /dev/null/file 2>/dev/null || echo yes" "yes\n" "" ""
+testing "-m missing/dir" "readlink -m sub/two/three" "$APWD/sub/two/three\n" "" ""
+testing "-m missing/../elsewhere" "readlink -m sub/two/../../three" "$APWD/three\n" "" ""
+testing "-m file/dir" "readlink -m sub/bang/two 2>/dev/null || echo err" "err\n" "" ""
rm link
ln -sf / link || exit 1
testing "-f link->/" "readlink -e link/dev" "/dev\n" "" ""