projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added test script constructs to avoid.
[mmh]
/
test
/
mhshow
/
test-subpart
diff --git
a/test/mhshow/test-subpart
b/test/mhshow/test-subpart
index
9d8fe29
..
eb74acd
100755
(executable)
--- a/
test/mhshow/test-subpart
+++ b/
test/mhshow/test-subpart
@@
-8,11
+8,12
@@
set -e
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
fi
-. ${MH_TEST_COMMON}
+. "$MH_OBJ_DIR/test/common.sh"
setup_test
setup_test
@@
-20,8
+21,8
@@
expected=$MH_TEST_DIR/$$.expected
actual=$MH_TEST_DIR/$$.actual
# Write message with a text/plain subpart.
actual=$MH_TEST_DIR/$$.actual
# Write message with a text/plain subpart.
-msgfile=$(mhpath new)
-msgnum=$(basename $msgfile)
+msgfile=`mhpath new`
+msgnum=`basename $msgfile`
cat > $msgfile <<EOF
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="NextPart_001"
cat > $msgfile <<EOF
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="NextPart_001"
@@
-56,4
+57,6
@@
EOF
# check it
mhshow -part 1.1 -form mhl.null -nopause $msgnum > $actual 2>&1
# check it
mhshow -part 1.1 -form mhl.null -nopause $msgnum > $actual 2>&1
-diff -u $expected $actual && rm -f $expected $actual
+check "$expected" "$actual"
+
+exit $failed