--- /dev/null
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 223D5431FB6\r
+ for <notmuch@notmuchmail.org>; Wed, 11 Sep 2013 10:36:54 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id f1kipYalFF3q for <notmuch@notmuchmail.org>;\r
+ Wed, 11 Sep 2013 10:36:46 -0700 (PDT)\r
+Received: from mail-ea0-f176.google.com (mail-ea0-f176.google.com\r
+ [209.85.215.176]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 697B8431FAF\r
+ for <notmuch@notmuchmail.org>; Wed, 11 Sep 2013 10:36:46 -0700 (PDT)\r
+Received: by mail-ea0-f176.google.com with SMTP id q16so4717672ead.7\r
+ for <notmuch@notmuchmail.org>; Wed, 11 Sep 2013 10:36:45 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
+ :references:mime-version:content-type:content-transfer-encoding;\r
+ bh=JqvkZtZE2GfUrgh+jAJ0NhTIxpKg1o/KS+9+4F8M7e4=;\r
+ b=cqCWsYNBtwf7mOzIGdNRpKYC0MnUaUuw9WdeEA/fn+qYp7af5t0I/nF58+CKJ6Zj88\r
+ st2zLuDEXhMp4YHf+8ISxAgqokXHSI2/zSAUsDhsh+/oqwHv5tcUAb6UXKkiVSFWyoa3\r
+ UBKuoKrv7nkE/Pkb2lQ6xcJtpm+j+aAq9k7MNiUEkK9TaCwpxhM2IMB/rLrGbbs3Zv8Y\r
+ lC0jtnFRMr48i9DvsvkzNXH5DJ1mIbYPKlMJsjkGrSYoywcePZXSv+QmxgrYgNoEE+BC\r
+ G9M7x8nEO/yQySfiiNpeYfDQebtO/jlWLP6WEmm463pPC6StL9c39jX6SLM1djsFPh4I\r
+ zm5w==\r
+X-Gm-Message-State:\r
+ ALoCoQmGu1XfNXsLWbt5R3BwMDy90adxcyyuciouCbmJLG2ebw+WbfLNlmPOCIuC60bPxC8hlxtf\r
+X-Received: by 10.14.213.68 with SMTP id z44mr3856661eeo.70.1378921005069;\r
+ Wed, 11 Sep 2013 10:36:45 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
+ [88.195.111.91])\r
+ by mx.google.com with ESMTPSA id a6sm42086629eei.10.1969.12.31.16.00.00\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Wed, 11 Sep 2013 10:36:44 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 1/2] test: add known broken tests for known broken RFC 2047\r
+ encodings\r
+Date: Wed, 11 Sep 2013 20:36:42 +0300\r
+Message-Id: <1378921003-14639-1-git-send-email-jani@nikula.org>\r
+X-Mailer: git-send-email 1.8.4.rc3\r
+In-Reply-To: <8738pcjet4.fsf@awakening.csail.mit.edu>\r
+References: <8738pcjet4.fsf@awakening.csail.mit.edu>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: 8bit\r
+Cc: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 11 Sep 2013 17:36:54 -0000\r
+\r
+Some common broken RFC 2047 encodings that we currently let gmime\r
+parse strictly. We could tell gmime to be forgiving in what it accepts\r
+as RFC 2047 encoding, making these tests pass.\r
+---\r
+ test/encoding | 18 ++++++++++++++++++\r
+ 1 file changed, 18 insertions(+)\r
+\r
+diff --git a/test/encoding b/test/encoding\r
+index 2e1326e..7372b6b 100755\r
+--- a/test/encoding\r
++++ b/test/encoding\r
+@@ -29,4 +29,22 @@ add_message '[content-type]="text/plain; charset=iso-8859-2"' \\r
+ output=$(notmuch search tučňáččí 2>&1 | notmuch_show_sanitize)\r
+ test_expect_equal "$output" "thread:0000000000000002 2001-01-05 [1/1] Notmuch Test Suite; ISO-8859-2 encoded message (inbox unread)"\r
+ \r
++test_begin_subtest "RFC 2047 encoded word with spaces"\r
++test_subtest_known_broken\r
++add_message '[subject]="=?utf-8?q?encoded word with spaces?="'\r
++output=$(notmuch search id:${gen_msg_id} 2>&1 | notmuch_show_sanitize)\r
++test_expect_equal "$output" "thread:0000000000000003 2001-01-05 [1/1] Notmuch Test Suite; encoded word with spaces (inbox unread)"\r
++\r
++test_begin_subtest "RFC 2047 encoded words back to back"\r
++test_subtest_known_broken\r
++add_message '[subject]="=?utf-8?q?encoded-words-back?==?utf-8?q?to-back?="'\r
++output=$(notmuch search id:${gen_msg_id} 2>&1 | notmuch_show_sanitize)\r
++test_expect_equal "$output" "thread:0000000000000004 2001-01-05 [1/1] Notmuch Test Suite; encoded-words-backto-back (inbox unread)"\r
++\r
++test_begin_subtest "RFC 2047 encoded words without space before or after"\r
++test_subtest_known_broken\r
++add_message '[subject]="=?utf-8?q?encoded?=word without=?utf-8?q?space?=" '\r
++output=$(notmuch search id:${gen_msg_id} 2>&1 | notmuch_show_sanitize)\r
++test_expect_equal "$output" "thread:0000000000000005 2001-01-05 [1/1] Notmuch Test Suite; encodedword withoutspace (inbox unread)"\r
++\r
+ test_done\r
+-- \r
+1.8.4.rc3\r
+\r