From f43befb005ed6e17ba9a78dc128950bf25bcfeda Mon Sep 17 00:00:00 2001 From: David Levine Date: Tue, 3 Jul 2012 20:50:23 -0500 Subject: [PATCH] Filtered out "From " lines when comparing mboxes because their timestamps sometimes differed by a second. --- test/rcv/test-rcvpack | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/test/rcv/test-rcvpack b/test/rcv/test-rcvpack index 9433a37..46327b4 100755 --- a/test/rcv/test-rcvpack +++ b/test/rcv/test-rcvpack @@ -19,14 +19,12 @@ setup_test # Use proper program, likely not the first one on PATH. rcvpack="${MH_LIB_DIR}/rcvpack" -expected=$MH_TEST_DIR/$$.expected -expected_err=$MH_TEST_DIR/$$.expected_err -actual=$MH_TEST_DIR/$$.actual -actual_err=$MH_TEST_DIR/$$.actual_err +expected="$MH_TEST_DIR/$$.expected" +actual="$MH_TEST_DIR/$$.actual" # check -help -cat >$expected <"$expected" <$actual 2>&1 -check $expected $actual +$rcvpack -help >"$actual" 2>&1 +check "$expected" "$actual" # check -version case `$rcvpack -v` in @@ -58,7 +56,10 @@ check "${MH_TEST_DIR}/Mail/inbox/1" "${MH_TEST_DIR}/Mail/inbox/11" 'keep first' # check -mbox $rcvpack -mmdf -mbox <${MH_TEST_DIR}/Mail/inbox/1 ${MH_TEST_DIR}/Mail/mbox2 -check "${MH_TEST_DIR}/Mail/mbox" "${MH_TEST_DIR}/Mail/mbox2" 'keep first' +# Filter out "From " lines because their timestamps can differ by a second. +grep -v '^From ' "${MH_TEST_DIR}/Mail/mbox" >"${MH_TEST_DIR}/Mail/mbox-filt" +grep -v '^From ' "${MH_TEST_DIR}/Mail/mbox2" >"${MH_TEST_DIR}/Mail/mbox2-filt" +check "${MH_TEST_DIR}/Mail/mbox-filt" "${MH_TEST_DIR}/Mail/mbox2-filt" # check append to existing mbox file $rcvpack <${MH_TEST_DIR}/Mail/inbox/2 ${MH_TEST_DIR}/Mail/mbox -- 1.7.10.4