X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/706236baa4c4670b5a074092dec5dec63ff50663..95a44a8aed37f5f8146b3fdced5718aa5e72f4ec:/test/pick/test-pick?ds=sidebyside diff --git a/test/pick/test-pick b/test/pick/test-pick index 84eb18cd..e1434dce 100755 --- a/test/pick/test-pick +++ b/test/pick/test-pick @@ -99,14 +99,12 @@ cat >"$expected" </dev/tty; then +if test -t 1 && (printf '' >/dev/tty) 2>/dev/null; then # Produce no standard output if no messages match and standard # output is a tty. To test that even when run with stdout # detached, write directly to /dev/tty. Can't capture the # output so hopefully the user will notice it. pick -subject message.3 -and -from Test4 >/dev/tty 2>/dev/null -else - echo "$0: skip tty test because can't write to /dev/tty" fi # Also, check that the exit status is 1. @@ -244,5 +242,31 @@ echo 12 >"$expected" pick -subject 'multi-line header field' 12 >"$actual" 2>&1 check "$expected" "$actual" +# Test MIME-encoded header. +cat >"$MH_TEST_DIR/Mail/inbox/13" < +To: Some User +Date: Fri, 29 Sep 2006 00:00:00 +Message-Id: 13@test.nmh +Subject: =?us-ascii?q?=66=6f=6f?= + =?utf-8?q?=62=61=72?= + +This is message number 13, with MIME-encoded Subject "foobar". +EOF + +echo 13 >"$expected" + +set +e +LC_CTYPE=en_US.UTF-8 pick -subject foobar 13 >"$actual" 2>&1 +set -e +check "$expected" "$actual" + +# Test -nosequence. +run_test 'pick +inbox 5 7 9 11 -sequence test -nosequence' '5 +7 +9 +11' +run_test 'mark -list -sequence test' 'test: ' + exit $failed