projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed install-mh -auto test by specifying HOME.
[mmh]
/
test
/
bad-input
/
test-header
diff --git
a/test/bad-input/test-header
b/test/bad-input/test-header
index
35d680a
..
b45a576
100755
(executable)
--- a/
test/bad-input/test-header
+++ b/
test/bad-input/test-header
@@
-5,23
+5,15
@@
#
######################################################
#
######################################################
-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
fi
-. ${MH_TEST_COMMON}
+. "$MH_OBJ_DIR/test/common.sh"
setup_test
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
expected=$MH_TEST_DIR/$$.expected
actual=$MH_TEST_DIR/$$.actual
@@
-43,7
+35,7
@@
cat > $expected <<EOF
11 12/18 foo@example.edu test<<This is a multi-part message in MIME forma
EOF
scan $msgnum > $actual 2>&1
11 12/18 foo@example.edu test<<This is a multi-part message in MIME forma
EOF
scan $msgnum > $actual 2>&1
-check
+check $expected $actual
# check show (mhl)
cat > $expected <<EOF
# check show (mhl)
cat > $expected <<EOF
@@
-61,7
+53,7
@@
This is a multi-part message in MIME format.
I am a stupid spammer.
EOF
show $msgnum > $actual 2>&1
I am a stupid spammer.
EOF
show $msgnum > $actual 2>&1
-check
+check $expected $actual
# check mhshow
cat > $expected <<EOF
# check mhshow
cat > $expected <<EOF
@@
-78,6
+70,6
@@
This is a multi-part message in MIME format.
I am a stupid spammer.
EOF
mhshow -nopause $msgnum > $actual 2>&1
I am a stupid spammer.
EOF
mhshow -nopause $msgnum > $actual 2>&1
-check
+check $expected $actual
exit $failed
exit $failed