From: David Levine Date: Wed, 14 Nov 2012 04:35:57 +0000 (-0600) Subject: 1) Don't bother checking stderr output from sendfiles because tar's X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=249681d7321292d887e9760258ad9fead2f98cd9;hp=6238d42a75a5e72619ee9c1df1d7649ece6cdaaf;p=mmh 1) Don't bother checking stderr output from sendfiles because tar's output format isn't standardized. 2) Added -c to uncompress. --- 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}