From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: [Patch v2 2/2] test: work around gmime bug using notmuch_reply_sanitize
Date: Sun, 10 Nov 2013 23:15:34 -0400 [thread overview]
Message-ID: <1384139734-14427-2-git-send-email-david@tethera.net> (raw)
In-Reply-To: <1384139734-14427-1-git-send-email-david@tethera.net>
The user still has to set NOTMUCH_TEST_WORKAROUNDS
---
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@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>, mailinglist@notmuchmail.org
@@ -27,7 +27,7 @@ add_message '[from]="Sender <sender@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>, mailinglist@notmuchmail.org
@@ -45,7 +45,7 @@ add_message '[from]="Sender <sender@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>, mailinglist@notmuchmail.org
@@ -65,7 +65,7 @@ add_message '[from]="Sender <sender@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>, mailinglist@notmuchmail.org
@@ -85,7 +85,7 @@ add_message '[from]="Sender <sender@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@otherdomain.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>, mailinglist@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>, mailinglist@notmuchmail.org
@@ -128,7 +128,7 @@ add_message '[from]="Sender <sender@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>, mailinglist@notmuchmail.org
@@ -146,7 +146,7 @@ add_message '[from]="Sender <sender@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>, mailinglist@notmuchmail.org
@@ -164,7 +164,7 @@ add_message '[from]="Sender <sender@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>, mailinglist@notmuchmail.org
@@ -184,7 +184,7 @@ add_message '[from]="Sender <sender@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>, mailinglist@notmuchmail.org
@@ -204,7 +204,7 @@ add_message '[from]="Sender <sender@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>, mailinglist@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@yoom.home.cworth.org'"
test_begin_subtest "'notmuch reply' to a multipart message"
-notmuch reply 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
+notmuch reply 'id:87liy5ap00.fsf@yoom.home.cworth.org' | notmuch_reply_sanitize >OUTPUT
cat <<EOF >EXPECTED
From: Notmuch Test Suite <test_suite@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@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>
@@ -26,7 +26,7 @@ add_message '[from]="Sender <sender@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>, Someone Else <someone@example.com>
@@ -44,7 +44,7 @@ add_message '[from]="Sender <sender@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>
@@ -62,7 +62,7 @@ add_message '[from]="Sender <sender@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>
@@ -80,7 +80,7 @@ add_message '[from]="Sender <sender@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>, someone@example.com
@@ -98,7 +98,7 @@ add_message '[from]="Sender <sender@example.com>"' \
'[body]="support for reply-to"' \
'[reply-to]="Sender <elsewhere@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <elsewhere@example.com>
@@ -116,7 +116,7 @@ add_message '[from]="Sender <sender@example.com>"' \
'[body]="Un-munging Reply-To"' \
'[reply-to]="Evil Munging List <list@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>, Some List <list@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@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@example.com>"' \
'[body]="From guessing"' \
'[header]="Envelope-To: test_suite_other@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@notmuchmail.org>
Subject: Re: From guessing
To: Sender <sender@example.com>, Recipient <recipient@example.com>
@@ -167,7 +167,7 @@ add_message '[from]="Sender <sender@example.com>"' \
'[body]="From guessing"' \
'[header]="X-Original-To: test_suite@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@otherdomain.org>
Subject: Re: From guessing
To: Sender <sender@example.com>, Recipient <recipient@example.com>
@@ -185,7 +185,7 @@ add_message '[from]="Sender <sender@example.com>"' \
'[body]="From guessing"' \
'[header]="Delivered-To: test_suite_other@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@notmuchmail.org>
Subject: Re: From guessing
To: Sender <sender@example.com>, Recipient <recipient@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@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@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>
@@ -26,7 +26,7 @@ add_message '[from]="Notmuch Test Suite <test_suite@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Recipient <recipient@example.com>
@@ -43,7 +43,7 @@ add_message '[from]="Sender <sender@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>
@@ -60,7 +60,7 @@ add_message '[from]="Notmuch Test Suite <test_suite@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Recipient <recipient@example.com>, Someone Else <someone@example.com>
@@ -78,7 +78,7 @@ add_message '[from]="Sender <sender@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>
@@ -96,7 +96,7 @@ add_message '[from]="Notmuch Test Suite <test_suite@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Recipient <recipient@example.com>
@@ -113,7 +113,7 @@ add_message '[from]="Notmuch Test Suite <test_suite@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
Cc: Other Parties <cc@example.com>
@@ -130,7 +130,7 @@ add_message '[from]="Sender <sender@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@example.com>
@@ -148,7 +148,7 @@ add_message '[from]="Sender <sender@example.com>"' \
'[body]="support for reply-to"' \
'[reply-to]="Sender <elsewhere@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <elsewhere@example.com>
@@ -166,7 +166,7 @@ add_message '[from]="Sender <sender@example.com>"' \
'[body]="support for reply-to with multiple recipients"' \
'[reply-to]="Sender <elsewhere@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <elsewhere@example.com>
@@ -184,7 +184,7 @@ add_message '[from]="Sender <sender@example.com>"' \
'[body]="Un-munging Reply-To"' \
'[reply-to]="Evil Munging List <list@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@notmuchmail.org>
Subject: Re: notmuch-reply-test
To: Sender <sender@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@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
next prev parent reply other threads:[~2013-11-11 3:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-10 16:21 fix for failing tests with gmime 2.6.19 David Bremner
2013-11-10 16:21 ` [PATCH 1/2] test: add optional workaround for gmime bug David Bremner
2013-11-10 16:21 ` [PATCH 2/2] test: work around gmime bug using notmuch_reply_sanitize David Bremner
2013-11-11 3:15 ` [Patch v2 1/2] test: add optional workaround for gmime bug David Bremner
2013-11-11 3:15 ` David Bremner [this message]
2013-11-11 3:47 ` fix for failing tests with gmime 2.6.19 Daniel Kahn Gillmor
2013-11-11 11:57 ` David Bremner
2013-11-11 13:42 ` David Bremner
2013-11-16 20:16 ` Jameson Graef Rollins
2013-11-16 23:00 ` David Bremner
2013-11-11 14:59 ` Tomi Ollila
2013-11-11 16:01 ` Jani Nikula
2013-11-18 17:54 ` Tomi Ollila
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1384139734-14427-2-git-send-email-david@tethera.net \
--to=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).