about summary refs log tree commit diff
path: root/t
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-11-11 17:26:58 +0100
committerDuncaen <mail@duncano.de>2017-11-11 17:27:00 +0100
commita6044693039dee22a01f51d4daa54cc3d5e4618b (patch)
tree76c8a873aa9a9acdc5fba09139dfab264ad860f6 /t
parente6239ef35357824308df079bd6df0dc4b202e898 (diff)
downloadmblaze-a6044693039dee22a01f51d4daa54cc3d5e4618b.tar.gz
mblaze-a6044693039dee22a01f51d4daa54cc3d5e4618b.tar.xz
mblaze-a6044693039dee22a01f51d4daa54cc3d5e4618b.zip
t: add test case for latest magrep crash
This crash was reported in #76 and resolved with
commit 6239ef35357824308df079bd6df0dc4b202e898.
Diffstat (limited to 't')
-rw-r--r--t/3000-magrep.t129
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'