From: David Bremner Date: Sun, 10 Nov 2013 16:21:22 +0000 (+2000) Subject: [PATCH 2/2] test: work around gmime bug using notmuch_reply_sanitize X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0cf591981bc47df00e7936bde846e3a054ecc33d;p=notmuch-archives.git [PATCH 2/2] test: work around gmime bug using notmuch_reply_sanitize --- diff --git a/fa/fda7142b5145ba9b5b4780b3377cf7b26cf4c3 b/fa/fda7142b5145ba9b5b4780b3377cf7b26cf4c3 new file mode 100644 index 000000000..3b5b1942b --- /dev/null +++ b/fa/fda7142b5145ba9b5b4780b3377cf7b26cf4c3 @@ -0,0 +1,399 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 1A2AD431FDB + for ; Sun, 10 Nov 2013 08:22:21 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id lEEUtwAYMzz5 for ; + Sun, 10 Nov 2013 08:22:13 -0800 (PST) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id E2D89431FDC + for ; Sun, 10 Nov 2013 08:22:12 -0800 (PST) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1VfXm8-0005q0-Im; Sun, 10 Nov 2013 12:22:12 -0400 +Received: (nullmailer pid 15739 invoked by uid 1000); Sun, 10 Nov 2013 + 16:22:09 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [PATCH 2/2] test: work around gmime bug using notmuch_reply_sanitize +Date: Sun, 10 Nov 2013 12:21:22 -0400 +Message-Id: <1384100482-15453-3-git-send-email-david@tethera.net> +X-Mailer: git-send-email 1.8.4.2 +In-Reply-To: <1384100482-15453-1-git-send-email-david@tethera.net> +References: <1384100482-15453-1-git-send-email-david@tethera.net> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sun, 10 Nov 2013 16:22:21 -0000 + +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 "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender , mailinglist@notmuchmail.org +@@ -27,7 +27,7 @@ add_message '[from]="Sender "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender , mailinglist@notmuchmail.org +@@ -45,7 +45,7 @@ add_message '[from]="Sender "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender , mailinglist@notmuchmail.org +@@ -65,7 +65,7 @@ add_message '[from]="Sender "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender , mailinglist@notmuchmail.org +@@ -85,7 +85,7 @@ add_message '[from]="Sender "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender , 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 + Subject: Re: notmuch-reply-test + To: Sender , mailinglist@notmuchmail.org +@@ -128,7 +128,7 @@ add_message '[from]="Sender "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender , mailinglist@notmuchmail.org +@@ -146,7 +146,7 @@ add_message '[from]="Sender "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender , mailinglist@notmuchmail.org +@@ -164,7 +164,7 @@ add_message '[from]="Sender "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender , mailinglist@notmuchmail.org +@@ -184,7 +184,7 @@ add_message '[from]="Sender "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender , mailinglist@notmuchmail.org +@@ -204,7 +204,7 @@ add_message '[from]="Sender "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender , 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 <EXPECTED + From: Notmuch Test Suite + 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 "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender +@@ -26,7 +26,7 @@ add_message '[from]="Sender "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender , Someone Else +@@ -44,7 +44,7 @@ add_message '[from]="Sender "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender +@@ -62,7 +62,7 @@ add_message '[from]="Sender "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender +@@ -80,7 +80,7 @@ add_message '[from]="Sender "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender , someone@example.com +@@ -98,7 +98,7 @@ add_message '[from]="Sender "' \ + '[body]="support for reply-to"' \ + '[reply-to]="Sender "' + +-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 + Subject: Re: notmuch-reply-test + To: Sender +@@ -116,7 +116,7 @@ add_message '[from]="Sender "' \ + '[body]="Un-munging Reply-To"' \ + '[reply-to]="Evil Munging 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 + Subject: Re: notmuch-reply-test + To: Sender , Some List +@@ -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 + 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 "' \ + '[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 + Subject: Re: From guessing + To: Sender , Recipient +@@ -167,7 +167,7 @@ add_message '[from]="Sender "' \ + '[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 + Subject: Re: From guessing + To: Sender , Recipient +@@ -185,7 +185,7 @@ add_message '[from]="Sender "' \ + '[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 + Subject: Re: From guessing + To: Sender , Recipient +@@ -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 + 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 "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender +@@ -26,7 +26,7 @@ add_message '[from]="Notmuch Test Suite "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Recipient +@@ -43,7 +43,7 @@ add_message '[from]="Sender "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender +@@ -60,7 +60,7 @@ add_message '[from]="Notmuch Test Suite "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Recipient , Someone Else +@@ -78,7 +78,7 @@ add_message '[from]="Sender "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender +@@ -96,7 +96,7 @@ add_message '[from]="Notmuch Test Suite "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Recipient +@@ -113,7 +113,7 @@ add_message '[from]="Notmuch Test Suite "' \ + '[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 + Subject: Re: notmuch-reply-test + Cc: Other Parties +@@ -130,7 +130,7 @@ add_message '[from]="Sender "' \ + '[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 + Subject: Re: notmuch-reply-test + To: Sender +@@ -148,7 +148,7 @@ add_message '[from]="Sender "' \ + '[body]="support for reply-to"' \ + '[reply-to]="Sender "' + +-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 + Subject: Re: notmuch-reply-test + To: Sender +@@ -166,7 +166,7 @@ add_message '[from]="Sender "' \ + '[body]="support for reply-to with multiple recipients"' \ + '[reply-to]="Sender "' + +-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 + Subject: Re: notmuch-reply-test + To: Sender +@@ -184,7 +184,7 @@ add_message '[from]="Sender "' \ + '[body]="Un-munging Reply-To"' \ + '[reply-to]="Evil Munging List "' + +-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 + Subject: Re: notmuch-reply-test + To: Sender +@@ -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 + 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 +