]> diplodocus.org Git - nmh/blobdiff - test/mhshow/test-cte-binary
Allow mhbuild to work when the message body is empty. You know, that
[nmh] / test / mhshow / test-cte-binary
index e5654bbff52f623ca7e024a8edc1199b56b9a312..9c31a657f06b59a888f558a8c02ef8c065efcf17 100755 (executable)
@@ -5,19 +5,20 @@
 #
 ######################################################
 
-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
 expected=$MH_TEST_DIR/$$.expected
 actual=$MH_TEST_DIR/$$.actual
 
 # Write message with Content-Transfer-Encoding: binary text.
-msgfile=$(mhpath new)
-msgnum=$(basename $msgfile)
+msgfile=`mhpath new`
+msgnum=`basename $msgfile`
 cat > $msgfile <<EOF
 Content-Transfer-Encoding: binary
 To: bar@example.edu
@@ -45,5 +46,8 @@ Content-Disposition: inline
 part       text/plain                  34
 This is a test; this is the body.
 EOF
-mhshow -nopause $msgnum > $actual 2>&1
-diff -u $expected $actual
+run_prog mhshow -nopause $msgnum > $actual 2>&1
+check "$expected" "$actual"
+
+exit $failed
+