From cd3f81ebe5c82f1fd5f610b0f2e0fa07ac27903e Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 8 Apr 2018 20:50:10 -0500 Subject: Add readlink -m to show where a missing path would be. Note: ubuntu will show -m through a file, this treat that as error. --- tests/readlink.test | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/readlink.test') 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" "" "" -- cgit v1.2.3