#!/bin/sh ###################################################### # # Test sortm # ###################################################### . "$MH_TEST_COMMON" expected=$MH_TEST_DIR/$$.expected actual=$MH_TEST_DIR/$$.actual cd "$MH_TEST_DIR" runandcheck "sortm -help" <$MH_TEST_DIR/Mail/inbox/11 < To: Some User Date: Fri, 29 Sep 2006 00:00:01 Alt-Date: Thu, 1 Sep 2005 00:00:00 Subject: Re: common subject This is message number 11 EOF cat >$MH_TEST_DIR/Mail/inbox/12 < To: Some User Date: Thu, 28 Sep 2006 23:59:59 Alt-Date: Sat, 30 Sep 2006 00:00:00 Subject: common subject This is message number 12 EOF # check with no options runandcheck sortm </dev/null runandcheck "sortm +inbox" </dev/null runandcheck "sortm -verbose" </dev/null runandcheck "sortm -verbose -noverbose" </dev/null runandcheck "sortm f l" </dev/null runandcheck "sortm -textfield subject -limit 0" </dev/null runandcheck "sortm -textfield from -limit 0" <$MH_TEST_DIR/Mail/inbox/13 < To: Some User Date: Tue, 31 Oct 2006 23:59:59 Subject: Re: common subject This is message number 13 EOF # check -textfield with finite -limit that doesn't cover message 13 refile 2-7 +inbox refile 1 +inbox folder -pack l >/dev/null runandcheck "sortm -textfield subject -limit 10" </dev/null runandcheck "sortm -textfield subject -limit 60" </dev/null runandcheck "sortm -textfield subject -limit 60 -notextfield" < $MH_TEST_DIR/Mail/inbox/14 runandcheck "sortm" <