X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=testsuite%2Freadlink.tests;fp=testsuite%2Freadlink.tests;h=e9d8da0fc8d6f49d8f3ced9e399c4f04b7a68ff0;hb=69c8c699aaa69e281e4a01be0f48a6498d3ac7cb;hp=c7fc8adf008d390c0e52071ae0506d574e630a8d;hpb=005c492c40ff833a99abd251872ec60661344474;p=oweals%2Fbusybox.git diff --git a/testsuite/readlink.tests b/testsuite/readlink.tests index c7fc8adf0..e9d8da0fc 100755 --- a/testsuite/readlink.tests +++ b/testsuite/readlink.tests @@ -21,10 +21,15 @@ testing "readlink on a link" "readlink ./$TESTLINK" "./$TESTFILE\n" "" "" optional FEATURE_READLINK_FOLLOW -testing "readlink -f on a file" "readlink -f ./$TESTFILE" "$PWD/$TESTFILE\n" "" "" -testing "readlink -f on a link" "readlink -f ./$TESTLINK" "$PWD/$TESTFILE\n" "" "" +# shell's $PWD may leave symlinks unresolved. +# "pwd" may be a built-in and have the same problem. +# External pwd _can't_ have that problem (current dir on Unix is physical). +pwd=`which pwd` +pwd=`$pwd` +testing "readlink -f on a file" "readlink -f ./$TESTFILE" "$pwd/$TESTFILE\n" "" "" +testing "readlink -f on a link" "readlink -f ./$TESTLINK" "$pwd/$TESTFILE\n" "" "" testing "readlink -f on an invalid link" "readlink -f ./$FAILLINK" "" "" "" -testing "readlink -f on a wierd dir" "readlink -f $TESTDIR/../$TESTFILE" "$PWD/$TESTFILE\n" "" "" +testing "readlink -f on a wierd dir" "readlink -f $TESTDIR/../$TESTFILE" "$pwd/$TESTFILE\n" "" "" # clean up