output_md5()
{
- @MD5SUM@ $* | @MD5FMT@
+ #### Output just the checksum. If the filename needs to appear on
+ #### the same line, the caller needs to add it. This avoids
+ #### differences due to a leading '*' binary file indicator, for
+ #### text files, on some platforms (Cygwin).
+ @MD5SUM@ $* | @MD5FMT@ | cut -d ' ' -f 1
}
test_skip ()
EOF
for f in MailAliases components digestcomps distcomps forwcomps mhl.body \
- mhl.digest mhl.format mhl.forward mhl.headers mhl.reply \
- mhn.defaults rcvdistcomps replcomps replgroupcomps scan.MMDDYY \
- scan.YYYYMMDD scan.default scan.mailx scan.nomime scan.size \
- scan.time scan.timely scan.unseen
+ mhl.digest mhl.format mhl.forward mhl.headers mhl.reply \
+ mhn.defaults rcvdistcomps replcomps replgroupcomps scan.MMDDYY \
+ scan.YYYYMMDD scan.default scan.mailx scan.nomime scan.size \
+ scan.time scan.timely scan.unseen
do
cp ${MH_INST_DIR}${sysconfdir}/${f} ${MH_TEST_DIR}/Mail || exit 1
done
THISDIR="$srcdir/test/inc"
TESTMBOX="$THISDIR/deb359167.mbox"
-if [ "$(output_md5 "$TESTMBOX" | cut -d ' ' -f 1)" != "e6ac458b8cccba2b2fd866fb505aeb5e" ]; then
- echo "Test mailbox has been corrupted"
- exit 1
+if [ `output_md5 "$TESTMBOX"` != "e6ac458b8cccba2b2fd866fb505aeb5e" ]; then
+ echo "Test mailbox has been corrupted"
+ exit 1
fi
#
# intact. (Since we're dealing in exact byte alignment
# minor corruptions such as line ending changes could
# render the tests useless.)
-(cd "$THISDIR" && output_md5 *.txt > "$MH_TEST_DIR/inctest.md5sums")
+(cd "$THISDIR" && \
+ for i in *.txt; do
+ echo `output_md5 $i`' '"$i" >> "$MH_TEST_DIR/inctest.md5sums"
+ done)
check "$THISDIR/md5sums" "$MH_TEST_DIR/inctest.md5sums" 'keep first'
FILLER="$THISDIR/filler.txt"