]> diplodocus.org Git - nmh/commitdiff
test-mhfixmsg: pwd(1)'s `-P' needed to avoid failure with symlinks.
authorRalph Corderoy <ralph@inputplus.co.uk>
Mon, 27 Nov 2017 15:20:44 +0000 (15:20 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 27 Nov 2017 15:30:30 +0000 (15:30 +0000)
Steven Winikoff reported to nmh-workers that one of this file's tests
failed in 1.7.  It attempts to manipulate the output of mhpath(1)
assuming it starts with the result of `pwd', but symlinks in the latter
may cause this to fail.  Use POSIX's `-P' option to ensure no symlinks,
as done in some other tests.

test/mhfixmsg/test-mhfixmsg

index c2070c5..e37b56a 100755 (executable)
@@ -1727,7 +1727,7 @@ check "`mhpath last`" "$actual" 'keep first'
 
 start_test "pass through message with relative folder path with parse error"
 #### Factor out leading portion of current folder path and make it relative.
-pwd=`pwd`
+pwd=`pwd -P`
 set +e
 run_prog mhfixmsg +./`mhpath | sed "s%^$pwd/%%"` last -out - >"$actual" 2>/dev/null
 set -e