From 249681d7321292d887e9760258ad9fead2f98cd9 Mon Sep 17 00:00:00 2001 From: David Levine Date: Tue, 13 Nov 2012 22:35:57 -0600 Subject: [PATCH] 1) Don't bother checking stderr output from sendfiles because tar's output format isn't standardized. 2) Added -c to uncompress. --- test/post/test-sendfiles | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/test/post/test-sendfiles b/test/post/test-sendfiles index 750c760..cc45960 100755 --- a/test/post/test-sendfiles +++ b/test/post/test-sendfiles @@ -17,20 +17,14 @@ fi setup_test expected=$MH_TEST_DIR/$$.expected -expected_err=$MH_TEST_DIR/$$.expected_err actual=$MH_TEST_DIR/$$.actual -actual_err=$MH_TEST_DIR/$$.actual_err localmbox=`$MH_LIB_DIR/ap -format "%(localmbox)" 0` #### Use this script itself for the test file. testfiledir="$srcdir/test/post" testfile=`basename $0` -(cd "$MH_TEST_DIR" && -mkdir -p tmp && -cat >"$expected_err" </dev/null 2>"$actual_err") + "$testfile" >/dev/null 2>&1) elif [ "$argstyle" = 'old' ]; then (cd "$MH_TEST_DIR" && sendfiles "$@" recipient@example.com "sendfiles test" \ - "$testfile" >/dev/null 2>"$actual_err") + "$testfile" >/dev/null 2>&1) fi - check "$expected_err" "$actual_err" 'keep first' - # fakesendmail drops the message and any cc's into this mbox. mbox="$MH_TEST_DIR"/Mail/fakesendmail.mbox inc -silent -file "$mbox" @@ -139,7 +131,8 @@ Usage: sendfiles [switches] -to recipient \ # because it will vary with compression method and compressed file # size. [ "`findprog bzip2`" ] && test_sendfiles 'bzip2 -cd' new -compress bzip2 -[ "`findprog compress`" ] && test_sendfiles uncompress new -compress compress +[ "`findprog compress`" ] && test_sendfiles 'uncompress -c' new \ + -compress compress [ "`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 @@ -215,8 +208,7 @@ EOF test_sendfiles cat new -compress none -5 -rm -fr "$MH_TEST_DIR/fakesendmail" "$MH_TEST_DIR/$testfile" \ - "$expected_err" "$MH_TEST_DIR/tmp" +rm -fr "$MH_TEST_DIR/fakesendmail" "$MH_TEST_DIR/$testfile" "$MH_TEST_DIR/tmp" exit ${failed:-0} -- 1.7.10.4