From a6044693039dee22a01f51d4daa54cc3d5e4618b Mon Sep 17 00:00:00 2001 From: Duncaen Date: Sat, 11 Nov 2017 17:26:58 +0100 Subject: t: add test case for latest magrep crash This crash was reported in #76 and resolved with commit 6239ef35357824308df079bd6df0dc4b202e898. --- t/3000-magrep.t | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 128 insertions(+), 1 deletion(-) (limited to 't') 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: ! +cat <"inbox/cur/4:2," +To: "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" , + "John Doe" +! + 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' -- cgit 1.4.1