localmbox=`$MH_LIB_DIR/ap -format "%(localmbox)" 0`
#### Use this script itself for the test file.
testfiledir="$srcdir/test/post"
testfile=`basename $0`
localmbox=`$MH_LIB_DIR/ap -format "%(localmbox)" 0`
#### Use this script itself for the test file.
testfiledir="$srcdir/test/post"
testfile=`basename $0`
#### Copy fakesendmail and the testfile because we cd to the
#### test directory, because tar doesn't like absolute paths.
cp "$srcdir/test/fakesendmail" "$testfiledir/$testfile" "$MH_TEST_DIR"
#### Copy fakesendmail and the testfile because we cd to the
#### test directory, because tar doesn't like absolute paths.
cp "$srcdir/test/fakesendmail" "$testfiledir/$testfile" "$MH_TEST_DIR"
if [ "$argstyle" = 'new' ]; then
(cd "$MH_TEST_DIR" &&
sendfiles "$@" -to recipient@example.com -subject "sendfiles test" \
if [ "$argstyle" = 'new' ]; then
(cd "$MH_TEST_DIR" &&
sendfiles "$@" -to recipient@example.com -subject "sendfiles test" \
# fakesendmail drops the message and any cc's into this mbox.
mbox="$MH_TEST_DIR"/Mail/fakesendmail.mbox
inc -silent -file "$mbox"
rm -f "$mbox" "$mbox.map"
# fakesendmail drops the message and any cc's into this mbox.
mbox="$MH_TEST_DIR"/Mail/fakesendmail.mbox
inc -silent -file "$mbox"
rm -f "$mbox" "$mbox.map"
# because it will vary with compression method and compressed file
# size.
[ "`findprog bzip2`" ] && test_sendfiles 'bzip2 -cd' new -compress bzip2
# because it will vary with compression method and compressed file
# size.
[ "`findprog bzip2`" ] && test_sendfiles 'bzip2 -cd' new -compress bzip2
[ "`findprog gzip`" ] && test_sendfiles 'gzip -cd' new -compress gzip
[ "`findprog gzip`" ] && test_sendfiles 'gzip -cd' new -gzip
[ "`findprog lzma`" ] && test_sendfiles 'lzma -cd' new -compress lzma
[ "`findprog gzip`" ] && test_sendfiles 'gzip -cd' new -compress gzip
[ "`findprog gzip`" ] && test_sendfiles 'gzip -cd' new -gzip
[ "`findprog lzma`" ] && test_sendfiles 'lzma -cd' new -compress lzma
# check with no compression, -none
cat >"$expected" <<EOF
msg part type/subtype size description
# check with no compression, -none
cat >"$expected" <<EOF
msg part type/subtype size description
# check -delay, though for a small file it doesn't do anything
cat >"$expected" <<EOF
msg part type/subtype size description
# check -delay, though for a small file it doesn't do anything
cat >"$expected" <<EOF
msg part type/subtype size description
# check old style -delay, though for a small file it doesn't do anything
cat >"$expected" <<EOF
msg part type/subtype size description
# check old style -delay, though for a small file it doesn't do anything
cat >"$expected" <<EOF
msg part type/subtype size description