diff options
Diffstat (limited to 't')
-rw-r--r-- | t/3000-magrep.t | 129 |
1 files changed, 128 insertions, 1 deletions
diff --git a/t/3000-magrep.t b/t/3000-magrep.t index d25a97b..4abf8c7 100644 --- a/t/3000-magrep.t +++ b/t/3000-magrep.t @@ -1,7 +1,7 @@ #!/bin/sh -e cd ${0%/*} . ./lib.sh -plan 9 +plan 10 rm -rf test.dir mkdir test.dir @@ -38,10 +38,136 @@ Message-Id: <EOH1F3NUOY.2KBVMHSBFATNY@example.org> ! +cat <<! | mmime >"inbox/cur/4:2," +To: "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com>, + "John Doe" <example@example.com> +! + cat <<! >seq inbox/cur/1:2, inbox/cur/2:2, inbox/cur/3:2, +inbox/cur/4:2, ! export MAILSEQ=seq @@ -51,6 +177,7 @@ check_test 'ignorecase' -eq 1 'magrep -i subject:NICE | wc -l' check_test 'invert' -eq 2 'magrep -v subject:nice | wc -l' check_test 'max matches' -eq 2 'magrep -m 2 from:Piet | wc -l' check_test 'long subject' -eq 1 'magrep subject:aliqua | wc -l' +check_test 'decode large rfc2047 header' -eq 1 'magrep -d to:John | wc -l' echo 'inbox/cur/1:2,: subject: wow nice subject' >expect check_same 'print' 'magrep -p subject:nice' 'cat expect' |