[PATCH 2/2] test for sanitized notmuch-search output

2011-05-09 Thread Florian Friesdorf
---
 test/corpus.ccs/cur/1:2, |8 
 test/search-output   |8 
 test/test-lib.sh |   12 
 3 files changed, 28 insertions(+), 0 deletions(-)
 create mode 100644 test/corpus.ccs/cur/1:2,

diff --git a/test/corpus.ccs/cur/1:2, b/test/corpus.ccs/cur/1:2,
new file mode 100644
index 000..60081c4
--- /dev/null
+++ b/test/corpus.ccs/cur/1:2,
@@ -0,0 +1,8 @@
+From: "Two =?ISO-8859-1?Q?line=0A_author?=" 
+To: notmuch at notmuchmail.org
+Date: Tue, 17 Nov 2009 21:28:37 +0600
+Subject: [notmuch] two =?ISO-8859-1?Q?line=0A_subject?=
+   headers
+Message-ID: <123>
+
+body
diff --git a/test/search-output b/test/search-output
index 33ae119..202c13e 100755
--- a/test/search-output
+++ b/test/search-output
@@ -316,4 +316,12 @@ cat  OUTPUT
+cat /dev/null
+cp -a ${MAIL_DIR} ../corpus.ccs.mail
+fi
+}
+
 test_begin_subtest ()
 {
 if [ -n "$inside_subtest" ]; then
-- 
1.7.5.1



[PATCH 2/2] test for sanitized notmuch-search output

2011-05-08 Thread Florian Friesdorf
---
 test/corpus.ccs/cur/1:2, |8 
 test/search-output   |8 
 test/test-lib.sh |   12 
 3 files changed, 28 insertions(+), 0 deletions(-)
 create mode 100644 test/corpus.ccs/cur/1:2,

diff --git a/test/corpus.ccs/cur/1:2, b/test/corpus.ccs/cur/1:2,
new file mode 100644
index 000..60081c4
--- /dev/null
+++ b/test/corpus.ccs/cur/1:2,
@@ -0,0 +1,8 @@
+From: Two =?ISO-8859-1?Q?line=0A_author?= t...@lineauthor.net
+To: notmuch@notmuchmail.org
+Date: Tue, 17 Nov 2009 21:28:37 +0600
+Subject: [notmuch] two =?ISO-8859-1?Q?line=0A_subject?=
+   headers
+Message-ID: 123
+
+body
diff --git a/test/search-output b/test/search-output
index 33ae119..202c13e 100755
--- a/test/search-output
+++ b/test/search-output
@@ -316,4 +316,12 @@ cat EOF EXPECTED
 EOF
 test_expect_equal_file OUTPUT EXPECTED
 
+test_begin_subtest notmuch search for message with quoted-printable 
line-breaks in author and subject
+add_email_corpus_control_char_subject
+notmuch search *  OUTPUT
+cat EOF EXPECTED
+thread:0001   2009-11-17 [1/1] Two line? author; [notmuch] two 
line? subject headers (inbox unread)
+EOF
+test_expect_equal_file OUTPUT EXPECTED
+
 test_done
diff --git a/test/test-lib.sh b/test/test-lib.sh
index eaf5051..0990d91 100755
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -417,6 +417,18 @@ add_email_corpus ()
 fi
 }
 
+add_email_corpus_control_char_subject ()
+{
+rm -rf ${MAIL_DIR}
+if [ -d ../corpus.ccs.mail ]; then
+cp -a ../corpus.ccs.mail ${MAIL_DIR}
+else
+cp -a ../corpus.ccs ${MAIL_DIR}
+notmuch new /dev/null
+cp -a ${MAIL_DIR} ../corpus.ccs.mail
+fi
+}
+
 test_begin_subtest ()
 {
 if [ -n $inside_subtest ]; then
-- 
1.7.5.1

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch