X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=test%2Fbad-input%2Ftest-header;h=9e66296ded055704a9156cb2c09b2093c96650ed;hb=57cd23b8807fa351800ba7277c5636a133241166;hp=35d680a63c821e33f52e45fe43c71f961bd6706b;hpb=6106441685a38400d9aa94ccb7218218102f941c;p=mmh diff --git a/test/bad-input/test-header b/test/bad-input/test-header index 35d680a..9e66296 100755 --- a/test/bad-input/test-header +++ b/test/bad-input/test-header @@ -5,29 +5,21 @@ # ###################################################### -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 -# TODO: Move to a common file tests can source; need more framework... -failed=0 -check() { - diff -u $expected $actual - if [ $? -ne 0 ]; then - failed=$((failed + 1)) - fi -} - expected=$MH_TEST_DIR/$$.expected actual=$MH_TEST_DIR/$$.actual # Write message with bogus header field (missing blank line, really). -msgfile=$(mhpath new) -msgnum=$(basename $msgfile) +msgfile=`mhpath new` +msgnum=`basename $msgfile` cat > $msgfile < $expected < $actual 2>&1 -check +scan -width 80 $msgnum > $actual 2>&1 +check $expected $actual # check show (mhl) cat > $expected < $actual 2>&1 -check +check $expected $actual # check mhshow cat > $expected < $actual 2>&1 -check +check $expected $actual exit $failed