output checking.
cat > "$MH" <<EOF || exit 1
Path: ${MH_TEST_DIR}/Mail
buildmimeproc: ${MH_INST_DIR}${bindir}/mhbuild
+fileproc: ${MH_INST_DIR}${bindir}/refile
libdir: ${MH_LIB_DIR}
+mhbuild: -nocontentid
mhlproc: ${MH_LIB_DIR}/mhl
moreproc: cat
-showproc: ${MH_LIB_DIR}/mhl
postproc: ${MH_LIB_DIR}/post
-fileproc: ${MH_INST_DIR}${bindir}/refile
+showproc: ${MH_LIB_DIR}/mhl
EOF
for f in MailAliases components digestcomps distcomps forwcomps mhl.body \
EOF
}
-# Munge the Content-Id from the draft after mhbuild, so we have a reliable
-# value to check.
-mungedraft() {
- sed 's/\(Content-ID:\) <[^>][^>]*>/\1 <TESTID>/' $draft > $actual
-}
-
draft="$MH_TEST_DIR/$$.draft"
draftorig="$MH_TEST_DIR/,$$.draft.orig"
expected="$MH_TEST_DIR/$$.expected"
Subject:
MIME-Version: 1.0
Content-Type: multipart/digest; boundary="----- =_aaaaaaaaaa0"
-Content-ID: <TESTID>
Content-Description: forwarded messages
------- =_aaaaaaaaaa0
EOF
mkdraft
mhbuild $draft
-mungedraft
-check $expected $actual
-test ${failed:-0} -eq 0 && rm "$draft" "$draftorig"
+check $expected $draft
+test ${failed:-0} -eq 0 && rm "$draftorig"
# check mhbuild -rfc934
cat > $expected <<EOF
Subject:
MIME-Version: 1.0
Content-Type: multipart/digest; boundary="----- =_aaaaaaaaaa0"
-Content-ID: <TESTID>
Content-Description: forwarded messages
EOF
mkdraft
mhbuild -rfc934 $draft
-mungedraft
-check $expected $actual
-test ${failed:-0} -eq 0 && rm "$draft" "$draftorig"
+check $expected $draft
+test ${failed:-0} -eq 0 && rm "$draftorig"
exit $failed
#
# It's hard to calculate the exact Date: header post is going to
# use, so we'll just use sed to remove the actual date so we can easily
- # compare it against our "correct" output. And same for
- # Content-ID and charset.
+ # compare it against our "correct" output. And same for charset.
#
sed -e 's/^Date:.*/Date:/' \
- -e 's/^Content-ID:.*/Content-ID:/' \
-e 's/; charset=".*//' \
"$cur" > "${testname}.actual"
Subject: Test
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
-Content-ID:
Date:
------- =_aaaaaaaaaa0
Subject: Test
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
-Content-ID:
Date:
------- =_aaaaaaaaaa0
sed -e 's/^Date:.*/Date:/' \
-e 's/^Resent-Date:.*/Resent-Date:/' \
- -e 's/^Message-ID:.*/Message-ID:/' \
- -e 's/^Content-ID:.*/Content-ID:/' "$actual" > "$actual".nodate
+ -e 's/^Message-ID:.*/Message-ID:/' "$actual" > "$actual".nodate
rm -f "$actual"
check "$actual".nodate "$1"
From: sender@example.com
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
-Content-ID:
Date:
Message-ID: