[PATCH 2/2] test: work around gmime bug using notmuch_reply_sanitize
David Bremner
david at tethera.net
Sun Nov 10 08:21:22 PST 2013
The user still has to set NOTMUCH_TEST_SLOPPY
---
test/from-guessing | 22 +++++++++++-----------
test/multipart | 2 +-
test/reply | 24 ++++++++++++------------
test/reply-to-sender | 24 ++++++++++++------------
4 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/test/from-guessing b/test/from-guessing
index 6dfaa40..bdda13b 100755
--- a/test/from-guessing
+++ b/test/from-guessing
@@ -9,7 +9,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="from guessing test"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>, mailinglist at notmuchmail.org
@@ -27,7 +27,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="from guessing test"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>, mailinglist at notmuchmail.org
@@ -45,7 +45,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="from guessing test"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>, mailinglist at notmuchmail.org
@@ -65,7 +65,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="from guessing test"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>, mailinglist at notmuchmail.org
@@ -85,7 +85,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="from guessing test"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at otherdomain.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>, mailinglist at notmuchmail.org
@@ -107,7 +107,7 @@ Received: from extraneous.example.com (extraneous.example.com [1.1.1.1])\"" \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="from guessing test"'
-output="$(notmuch reply id:${gen_msg_id})"
+output="$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)"
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>, mailinglist at notmuchmail.org
@@ -128,7 +128,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="from guessing test"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>, mailinglist at notmuchmail.org
@@ -146,7 +146,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="from guessing test"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>, mailinglist at notmuchmail.org
@@ -164,7 +164,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="from guessing test"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>, mailinglist at notmuchmail.org
@@ -184,7 +184,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="from guessing test"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>, mailinglist at notmuchmail.org
@@ -204,7 +204,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="from guessing test"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>, mailinglist at notmuchmail.org
diff --git a/test/multipart b/test/multipart
index b40fa2c..05a5f1d 100755
--- a/test/multipart
+++ b/test/multipart
@@ -569,7 +569,7 @@ test_expect_success \
"! notmuch show --format=mbox --part=1 'id:87liy5ap00.fsf at yoom.home.cworth.org'"
test_begin_subtest "'notmuch reply' to a multipart message"
-notmuch reply 'id:87liy5ap00.fsf at yoom.home.cworth.org' >OUTPUT
+notmuch reply 'id:87liy5ap00.fsf at yoom.home.cworth.org' | notmuch_reply_sanitize >OUTPUT
cat <<EOF >EXPECTED
From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: Multipart message
diff --git a/test/reply b/test/reply
index b0d854a..8929de0 100755
--- a/test/reply
+++ b/test/reply
@@ -9,7 +9,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="basic reply test"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>
@@ -26,7 +26,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="Multiple recipients"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>, Someone Else <someone at example.com>
@@ -44,7 +44,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="reply with CC"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>
@@ -62,7 +62,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="reply from alternate address"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>
@@ -80,7 +80,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="Reply from address in named group list"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>, someone at example.com
@@ -98,7 +98,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[body]="support for reply-to"' \
'[reply-to]="Sender <elsewhere at example.com>"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <elsewhere at example.com>
@@ -116,7 +116,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[body]="Un-munging Reply-To"' \
'[reply-to]="Evil Munging List <list at example.com>"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>, Some List <list at example.com>
@@ -130,7 +130,7 @@ test_begin_subtest "Message with header of exactly 200 bytes"
add_message '[subject]="This subject is exactly 200 bytes in length. Other than its length there is not much of note here. Note that the length of 200 bytes includes the Subject: and Re: prefixes with two spaces"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="200-byte header"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: This subject is exactly 200 bytes in length. Other than its
length there is not much of note here. Note that the length of 200 bytes
@@ -149,7 +149,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[body]="From guessing"' \
'[header]="Envelope-To: test_suite_other at notmuchmail.org"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other at notmuchmail.org>
Subject: Re: From guessing
To: Sender <sender at example.com>, Recipient <recipient at example.com>
@@ -167,7 +167,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[body]="From guessing"' \
'[header]="X-Original-To: test_suite at otherdomain.org"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at otherdomain.org>
Subject: Re: From guessing
To: Sender <sender at example.com>, Recipient <recipient at example.com>
@@ -185,7 +185,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[body]="From guessing"' \
'[header]="Delivered-To: test_suite_other at notmuchmail.org"'
-output=$(notmuch reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other at notmuchmail.org>
Subject: Re: From guessing
To: Sender <sender at example.com>, Recipient <recipient at example.com>
@@ -204,7 +204,7 @@ add_message '[subject]="=?iso-8859-1?q?=e0=df=e7?="' \
# GMime happens to change from Q- to B-encoding. We canonicalize the
# case of the encoding and charset because different versions of GMime
# capitalize the encoding differently.
-output=$(notmuch reply id:${gen_msg_id} | perl -pe 's/=\?[^?]+\?[bB]\?/lc($&)/ge')
+output=$(notmuch reply id:${gen_msg_id} | perl -pe 's/=\?[^?]+\?[bB]\?/lc($&)/ge' | notmuch_reply_sanitize)
test_expect_equal "$output" "\
From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: =?iso-8859-1?b?4N/n?=
diff --git a/test/reply-to-sender b/test/reply-to-sender
index 30e5e38..194b2ae 100755
--- a/test/reply-to-sender
+++ b/test/reply-to-sender
@@ -9,7 +9,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="basic reply-to-sender test"'
-output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
+output=$(notmuch reply --reply-to=sender id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>
@@ -26,7 +26,7 @@ add_message '[from]="Notmuch Test Suite <test_suite at notmuchmail.org>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="basic reply-to-from-us test"'
-output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
+output=$(notmuch reply --reply-to=sender id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Recipient <recipient at example.com>
@@ -43,7 +43,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="Multiple recipients"'
-output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
+output=$(notmuch reply --reply-to=sender id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>
@@ -60,7 +60,7 @@ add_message '[from]="Notmuch Test Suite <test_suite at notmuchmail.org>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="From Us, Multiple TO recipients"'
-output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
+output=$(notmuch reply --reply-to=sender id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Recipient <recipient at example.com>, Someone Else <someone at example.com>
@@ -78,7 +78,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="reply with CC"'
-output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
+output=$(notmuch reply --reply-to=sender id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>
@@ -96,7 +96,7 @@ add_message '[from]="Notmuch Test Suite <test_suite at notmuchmail.org>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="reply with CC"'
-output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
+output=$(notmuch reply --reply-to=sender id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Recipient <recipient at example.com>
@@ -113,7 +113,7 @@ add_message '[from]="Notmuch Test Suite <test_suite at notmuchmail.org>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="reply with CC"'
-output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
+output=$(notmuch reply --reply-to=sender id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
Cc: Other Parties <cc at example.com>
@@ -130,7 +130,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="reply from alternate address"'
-output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
+output=$(notmuch reply --reply-to=sender id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>
@@ -148,7 +148,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[body]="support for reply-to"' \
'[reply-to]="Sender <elsewhere at example.com>"'
-output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
+output=$(notmuch reply --reply-to=sender id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <elsewhere at example.com>
@@ -166,7 +166,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[body]="support for reply-to with multiple recipients"' \
'[reply-to]="Sender <elsewhere at example.com>"'
-output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
+output=$(notmuch reply --reply-to=sender id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <elsewhere at example.com>
@@ -184,7 +184,7 @@ add_message '[from]="Sender <sender at example.com>"' \
'[body]="Un-munging Reply-To"' \
'[reply-to]="Evil Munging List <list at example.com>"'
-output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
+output=$(notmuch reply --reply-to=sender id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender at example.com>
@@ -198,7 +198,7 @@ test_begin_subtest "Message with header of exactly 200 bytes"
add_message '[subject]="This subject is exactly 200 bytes in length. Other than its length there is not much of note here. Note that the length of 200 bytes includes the Subject: and Re: prefixes with two spaces"' \
'[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
'[body]="200-byte header"'
-output=$(notmuch reply --reply-to=sender id:${gen_msg_id})
+output=$(notmuch reply --reply-to=sender id:${gen_msg_id} | notmuch_reply_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite at notmuchmail.org>
Subject: Re: This subject is exactly 200 bytes in length. Other than its
length there is not much of note here. Note that the length of 200 bytes
--
1.8.4.2
More information about the notmuch
mailing list