X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/68cb35c28d5d050867d9442c177019f0c1fcbdc7..f19250c0b7739e928eb9e869ef04ea9fb61488c7:/test/folder/test-sortm diff --git a/test/folder/test-sortm b/test/folder/test-sortm index 7ef656cd..331eae7d 100755 --- a/test/folder/test-sortm +++ b/test/folder/test-sortm @@ -37,7 +37,8 @@ Usage: sortm [+folder] [msgs] [switches] -help EOF -sortm -help >"$actual" 2>&1 +#### Skip nmh intro text. +run_prog sortm -help | sed '/^$/Q' >"$actual" 2>&1 check "$expected" "$actual" # check -version @@ -83,8 +84,8 @@ cat >"$expected" <> EOF -sortm -scan >"$actual" +run_prog sortm +scan -width 80 >"$actual" check "$expected" "$actual" # check +folder @@ -104,8 +105,8 @@ cat >"$expected" </dev/null -sortm +inbox -scan >"$actual" +run_prog sortm +inbox +scan -width 80 >"$actual" check "$expected" "$actual" # check -verbose @@ -138,8 +139,8 @@ message 1 becomes message 2 EOF refile first +inbox; folder -pack >/dev/null -sortm -verbose >"$actual" -scan >>"$actual" +run_prog sortm -verbose >"$actual" +scan -width 80 >>"$actual" check "$expected" "$actual" # check -noverbose @@ -159,8 +160,8 @@ cat >"$expected" </dev/null -sortm -verbose -noverbose >"$actual" -scan >>"$actual" +run_prog sortm -verbose -noverbose >"$actual" +scan -width 80 >>"$actual" check "$expected" "$actual" # check msgs @@ -180,8 +181,8 @@ cat >"$expected" </dev/null -sortm first last -scan >"$actual" +run_prog sortm first last +scan -width 80 >"$actual" check "$expected" "$actual" # check -datefield @@ -200,8 +201,8 @@ cat >"$expected" <> EOF -sortm -datefield Alt-Date 1 11 -scan >"$actual" +run_prog sortm -datefield Alt-Date 1 11 +scan -width 80 >"$actual" check "$expected" "$actual" # check -textfield subject (datefield major, subjects grouped) @@ -220,8 +221,8 @@ cat >"$expected" <> EOF -sortm -textfield subject -scan >"$actual" +run_prog sortm -textfield subject +scan -width 80 >"$actual" check "$expected" "$actual" # check -nolimit @@ -240,8 +241,8 @@ cat >"$expected" <> EOF -sortm -textfield subject -limit 0 -nolimit -scan >"$actual" +run_prog sortm -textfield subject -limit 0 -nolimit +scan -width 80 >"$actual" check "$expected" "$actual" # check -textfield subject -limit 0 (subject sort) @@ -261,8 +262,8 @@ cat >"$expected" </dev/null -sortm -textfield subject -limit 0 -scan >"$actual" +run_prog sortm -textfield subject -limit 0 +scan -width 80 >"$actual" check "$expected" "$actual" # check -textfield -limit 0 (text sort) @@ -282,8 +283,8 @@ cat >"$expected" </dev/null -sortm -textfield from -limit 0 -scan >"$actual" +run_prog sortm -textfield from -limit 0 +scan -width 80 >"$actual" check "$expected" "$actual" # check -textfield with finite -limit that doesn't cover message 13 @@ -313,8 +314,8 @@ cat >"$expected" </dev/null -sortm -textfield subject -limit 10 -scan >"$actual" +run_prog sortm -textfield subject -limit 10 +scan -width 80 >"$actual" check "$expected" "$actual" # check -textfield with finite -limit that does cover message 13 @@ -335,8 +336,8 @@ cat >"$expected" </dev/null -sortm -textfield subject -limit 60 -scan >"$actual" +run_prog sortm -textfield subject -limit 60 +scan -width 80 >"$actual" check "$expected" "$actual" # check -notextfield @@ -357,8 +358,8 @@ cat >"$expected" </dev/null -sortm -textfield subject -limit 60 -notextfield -scan >"$actual" +run_prog sortm -textfield subject -limit 60 -notextfield +scan -width 80 >"$actual" check "$expected" "$actual" # check -noall @@ -382,19 +383,19 @@ cat >"$expected" </dev/null -sortm -noall -all -scan >"$actual" +run_prog sortm -noall -all +scan -width 80 >"$actual" check "$expected" "$actual" # check -check cat >"$expected" < $MH_TEST_DIR/Mail/inbox/14 set +e -sortm -check >"$actual" 2>&1 +run_prog sortm -check >"$actual" 2>&1 set -e check "$expected" "$actual" @@ -414,7 +415,7 @@ cat >"$expected" <> 14 01/00 Test9 Testing message 9<> EOF -scan >"$actual" +scan -width 80 >"$actual" check "$expected" "$actual" # check -nocheck @@ -437,8 +438,9 @@ EOF sed -e 's/Sep//' $MH_TEST_DIR/Mail/inbox/7 > $MH_TEST_DIR/Mail/inbox/14 run_test 'sortm -check -nocheck' \ - "sortm: can't parse date field in message 14, continuing..." -scan >"$actual" + "sortm: can't parse date field in message 14, will use file \ +modification time" +scan -width 80 >"$actual" check "$expected" "$actual"