]> diplodocus.org Git - nmh/blobdiff - test/mhshow/test-qp
Added full output test to test-scan.
[nmh] / test / mhshow / test-qp
index c19a34353c0ae003930512c4b61bc75e92605310..1b78c8eac02b6eecac48b348bfe7e4e675f88236 100755 (executable)
@@ -7,11 +7,12 @@
 
 set -e
 
-if [ -z "${MH_TEST_COMMON}" ]; then
-    echo "MH_TEST_COMMON not set; try running via 'make check'"
+if test -z "${MH_OBJ_DIR}"; then
+    srcdir=`dirname "$0"`/../..
+    MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
 fi
 
-. ${MH_TEST_COMMON}
+. "$MH_OBJ_DIR/test/common.sh"
 
 setup_test
 
@@ -19,8 +20,8 @@ expected=$MH_TEST_DIR/$$.expected
 actual=$MH_TEST_DIR/$$.actual
 
 # Write message with bogus quoted-printable data.
-msgfile=$(mhpath new)
-msgnum=$(basename $msgfile)
+msgfile=`mhpath new`
+msgnum=`basename $msgfile`
 cat > $msgfile <<EOF
 From: foo@example.edu
 To: bar@example.edu
@@ -46,6 +47,7 @@ EOF
 
 # check it
 cat > $expected <<EOF
+[ Message inbox:11 ]
 Date:    Sun, 18 Dec 2005 00:52:39 +0100
 To:      bar@example.edu
 From:    foo@example.edu
@@ -53,7 +55,7 @@ Subject: test
 
 MIME-Version: 1.0
 
-part       text/plain                 181
+[ part  - text/plain -   181B  ]
 =
 =
 ignored space at end
@@ -67,5 +69,7 @@ just a newline
 =l
 =\b ^H (backspace) character, probably erased = in diff output
 EOF
-mhshow -nopause $msgnum > $actual 2>&1
-diff -u $expected $actual
+run_prog mhshow $msgnum > $actual 2>&1
+check "$expected" "$actual" : bogus quoted-printable data
+
+exit $failed