X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=test%2Fbad-input%2Ftest-header;h=9e66296ded055704a9156cb2c09b2093c96650ed;hb=57cd23b8807fa351800ba7277c5636a133241166;hp=71a63a9abbc4eda8f4d064d0f5fc3c2d7986c5ea;hpb=93a31f9b884f8e8f3f7a7d50cf90ffd365a14f7c;p=mmh diff --git a/test/bad-input/test-header b/test/bad-input/test-header index 71a63a9..9e66296 100755 --- a/test/bad-input/test-header +++ b/test/bad-input/test-header @@ -6,29 +6,20 @@ ###################################################### if test -z "${MH_OBJ_DIR}"; then - srcdir=`dirname $0`/../.. - MH_OBJ_DIR=`cd $srcdir && pwd`; export MH_OBJ_DIR + srcdir=`dirname "$0"`/../.. + MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR fi . "$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