]> diplodocus.org Git - nmh/commitdiff
Canonicalized MH_TEST_DIR, and replaced use of `pwd` with it, to
authorDavid Levine <levinedl@acm.org>
Wed, 10 Aug 2016 15:19:00 +0000 (11:19 -0400)
committerDavid Levine <levinedl@acm.org>
Wed, 10 Aug 2016 15:19:00 +0000 (11:19 -0400)
try to prevent test failures on fbsd10 test host.

test/common.sh.in
test/mhstore/test-mhstore

index fc92813..8977391 100644 (file)
@@ -5,7 +5,9 @@
 #### The following variables are set by "make check".  Ensure
 #### that they are set here so that individual tests can be run
 #### outside of make.  Requires that MH_OBJ_DIR be set on entry.
-test -z "$MH_TEST_DIR"  &&  MH_TEST_DIR="$MH_OBJ_DIR/test/testdir"
+#### Use the result of cd and pwd so that the result will agree
+#### with what getcwd(3) returns.
+test -z "$MH_TEST_DIR"  &&  MH_TEST_DIR=`cd "$MH_OBJ_DIR/test/testdir" && pwd`
 export MH_TEST_DIR
 test -z "$MH_INST_DIR"  &&  MH_INST_DIR="${MH_TEST_DIR}/inst"
 test -z "$prefix"  &&  prefix=@prefix@
index 6e8c52a..716c2dd 100755 (executable)
@@ -312,7 +312,7 @@ check "$expected" 7.txt.2 'keep first'
 
 # check -clobber never.  Its exit status is the number of files not overwritten.
 run_test 'mhstore -clobber never' \
-         "mhstore: will not overwrite `pwd`/7.txt with -clobber never"
+         "mhstore: will not overwrite $MH_TEST_DIR/Mail/7.txt with -clobber never"
 set +e
 mhstore -clobber never >/dev/null 2>&1
 run_test "echo $?" 1