From 6a906a10a9d1ec7f595fe28da52831ce310efded Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Wed, 11 Sep 2013 22:57:41 +0300 Subject: [PATCH] Re: [PATCH v2 1/2] test: add known broken tests for known broken RFC 2047 encodings --- d1/199cba9307cd16472e7fbb93ece73544b487c6 | 109 ++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 d1/199cba9307cd16472e7fbb93ece73544b487c6 diff --git a/d1/199cba9307cd16472e7fbb93ece73544b487c6 b/d1/199cba9307cd16472e7fbb93ece73544b487c6 new file mode 100644 index 000000000..368bfae6b --- /dev/null +++ b/d1/199cba9307cd16472e7fbb93ece73544b487c6 @@ -0,0 +1,109 @@ +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 3F98D431FB6 + for ; Wed, 11 Sep 2013 12:57:56 -0700 (PDT) +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 2ETcNUGNMeSN for ; + Wed, 11 Sep 2013 12:57:48 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 5087C431FAF + for ; Wed, 11 Sep 2013 12:57:48 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id DB049100090; + Wed, 11 Sep 2013 22:57:41 +0300 (EEST) +From: Tomi Ollila +To: Jani Nikula , notmuch@notmuchmail.org +Subject: Re: [PATCH v2 1/2] test: add known broken tests for known broken RFC + 2047 encodings +In-Reply-To: <1378921003-14639-1-git-send-email-jani@nikula.org> +References: <8738pcjet4.fsf@awakening.csail.mit.edu> + <1378921003-14639-1-git-send-email-jani@nikula.org> +User-Agent: Notmuch/0.16+76~ga4151ca (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +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: Wed, 11 Sep 2013 19:57:56 -0000 + +On Wed, Sep 11 2013, Jani Nikula wrote: + +> Some common broken RFC 2047 encodings that we currently let gmime +> parse strictly. We could tell gmime to be forgiving in what it accepts +> as RFC 2047 encoding, making these tests pass. +> --- + +V2 LGTM. + +Tomi + +> test/encoding | 18 ++++++++++++++++++ +> 1 file changed, 18 insertions(+) +> +> diff --git a/test/encoding b/test/encoding +> index 2e1326e..7372b6b 100755 +> --- a/test/encoding +> +++ b/test/encoding +> @@ -29,4 +29,22 @@ add_message '[content-type]=3D"text/plain; charset=3Di= +so-8859-2"' \ +> output=3D$(notmuch search tu=C4=8D=C5=88=C3=A1=C4=8D=C4=8D=C3=AD 2>&1 | = +notmuch_show_sanitize) +> test_expect_equal "$output" "thread:0000000000000002 2001-01-05 [1/1] = +Notmuch Test Suite; ISO-8859-2 encoded message (inbox unread)" +>=20=20 +> +test_begin_subtest "RFC 2047 encoded word with spaces" +> +test_subtest_known_broken +> +add_message '[subject]=3D"=3D?utf-8?q?encoded word with spaces?=3D"' +> +output=3D$(notmuch search id:${gen_msg_id} 2>&1 | notmuch_show_sanitize) +> +test_expect_equal "$output" "thread:0000000000000003 2001-01-05 [1/1] = +Notmuch Test Suite; encoded word with spaces (inbox unread)" +> + +> +test_begin_subtest "RFC 2047 encoded words back to back" +> +test_subtest_known_broken +> +add_message '[subject]=3D"=3D?utf-8?q?encoded-words-back?=3D=3D?utf-8?q?= +to-back?=3D"' +> +output=3D$(notmuch search id:${gen_msg_id} 2>&1 | notmuch_show_sanitize) +> +test_expect_equal "$output" "thread:0000000000000004 2001-01-05 [1/1] = +Notmuch Test Suite; encoded-words-backto-back (inbox unread)" +> + +> +test_begin_subtest "RFC 2047 encoded words without space before or after" +> +test_subtest_known_broken +> +add_message '[subject]=3D"=3D?utf-8?q?encoded?=3Dword without=3D?utf-8?q= +?space?=3D" ' +> +output=3D$(notmuch search id:${gen_msg_id} 2>&1 | notmuch_show_sanitize) +> +test_expect_equal "$output" "thread:0000000000000005 2001-01-05 [1/1] = +Notmuch Test Suite; encodedword withoutspace (inbox unread)" +> + +> test_done +> --=20 +> 1.8.4.rc3 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2