From: Ken Hornstein Date: Mon, 27 Feb 2012 02:14:04 +0000 (-0500) Subject: Fix up some of the pick tests: X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=80b2767e802566662044eee232384b1f95dc6b61;p=mmh Fix up some of the pick tests: - Change sed invocation around to get rid of GNU sed extensions - Put explicit times in the pick tests (if you don't, it uses the current hour/minutes as the timestamp, which means it could work or not work depending on what time of day you run the tests). --- diff --git a/test/pick/test-pick b/test/pick/test-pick index 6ee4449..2396811 100755 --- a/test/pick/test-pick +++ b/test/pick/test-pick @@ -22,8 +22,10 @@ actual=$MH_TEST_DIR/$$.actual # Add an 11th message. sed \ -e 's/10/11/g' \ - -e 's/^To:\(.*\)/To:\1\nCc: /' \ - -e 's/^\(Date:.*\)2006\( 00:00:\)00/\12008\200\nDelivery-Date: \12009\241/' \ + -e 's/^To:\(.*\)/To:\1\ +Cc: /' \ + -e 's/^\(Date:.*\)2006\( 00:00:\)00/\12008\200\ +Delivery-Date: \12009\241/' \ $MH_TEST_DIR/Mail/inbox/10 >$MH_TEST_DIR/Mail/inbox/11 # Test message specification. @@ -131,34 +133,35 @@ run_test 'pick -to some -nolist' '11 hits' run_test 'pick -to user@example.com -nolist' '11 hits' # Test -after. -pick -after '28 Sep 2008' >$actual 2>&1 +pick -after '28 Sep 2008 00:00:00' >$actual 2>&1 cat >$expected <$actual 2>/dev/null +! pick -after '29 Sep 2008 00:00:00' >$actual 2>/dev/null cat >$expected <$actual 2>&1 +pick -before '29 Sep 2008 00:00:01' last:3 >$actual 2>&1 cat >$expected <$actual 2>&1 +pick -before '28 Sep 2008 00:00:00:' last:3 >$actual 2>&1 cat >$expected <$actual 2>/dev/null +! pick -before '28 Sep 2006 00:00:00' last:3 >$actual 2>/dev/null cat >$expected <