]> diplodocus.org Git - nmh/blobdiff - test/common.sh.in
Fixed a couple of typos in man pages.
[nmh] / test / common.sh.in
index 1e93f1b..4635f9c 100644 (file)
@@ -5,7 +5,10 @@
 #### 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 -P 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 -P`
+export MH_TEST_DIR
 test -z "$MH_INST_DIR"  &&  MH_INST_DIR="${MH_TEST_DIR}/inst"
 test -z "$MH_VERSION"  &&  MH_VERSION="@VERSION@"
 test -z "$prefix"  &&  prefix=@prefix@
@@ -173,7 +176,7 @@ prepare_space() {
 #### Optional arguments:
 ####   'keep first' -- first file is removed unless this is present.
 ####   'ignore space' -- spacing differences will not be considered
-####        signficant, emulating GNU diff -w.  It is assumed that the
+####        significant, emulating GNU diff -w.  It is assumed that the
 ####        first file has already been run through prepare_space.
 ####   ':' <test name> -- will print '<test name>' in the failure message,
 ####        to make it easier to tell which of multiple tests has failed.
@@ -337,6 +340,7 @@ setup_test ()
 
   # clean old test data on exit
   trap cleanup 0
+
   # setup test data
   mkdir -p "$MH_TEST_DIR/Mail" || exit 1
   cat > "$MH" <<EOF || exit 1