From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id BD1B86DE0941 for ; Mon, 30 Jul 2018 15:46:38 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 1.25 X-Spam-Level: * X-Spam-Status: No, score=1.25 tagged_above=-999 required=5 tests=[AWL=-1.239, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_DBL_SPAM=2.5] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o2zyAkaBmwBi for ; Mon, 30 Jul 2018 15:46:37 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id BEACF6DE0209 for ; Mon, 30 Jul 2018 15:46:35 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1fkGvy-0002Cz-Tz; Mon, 30 Jul 2018 18:46:34 -0400 Received: (nullmailer pid 28743 invoked by uid 1000); Mon, 30 Jul 2018 22:45:56 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH 11/15] test/thread-replies: mangle In-Reply-To's Date: Tue, 31 Jul 2018 06:45:51 +0800 Message-Id: <20180730224555.26047-12-david@tethera.net> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180730224555.26047-1-david@tethera.net> References: <20180730224555.26047-1-david@tethera.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 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: Mon, 30 Jul 2018 22:46:38 -0000 In a future commit, we will start trusting In-Reply-To's when they look sane (i.e. a single message-id). Modify these tests so they will keep passing (i.e. keep choosing References) when that happens. --- test/T510-thread-replies.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/T510-thread-replies.sh b/test/T510-thread-replies.sh index 4d0e0665..d94c9a0c 100755 --- a/test/T510-thread-replies.sh +++ b/test/T510-thread-replies.sh @@ -45,10 +45,10 @@ expected='[[[{"id": "foo@one.com", expected=`echo "$expected" | notmuch_json_show_sanitize` test_expect_equal_json "$output" "$expected" -test_begin_subtest "Prefer References to In-Reply-To" +test_begin_subtest "Prefer References to dodgy In-Reply-To" add_message '[id]="foo@two.com"' \ '[subject]=two' -add_message '[in-reply-to]=""' \ +add_message '[in-reply-to]="Your message of December 31 1999 "' \ '[references]=""' \ '[subject]="Re: two"' output=$(notmuch show --format=json 'subject:two' | notmuch_json_show_sanitize) @@ -101,12 +101,12 @@ expected='[[[{"id": "foo@three.com", "match": true, "excluded": false, expected=`echo "$expected" | notmuch_json_show_sanitize` test_expect_equal_json "$output" "$expected" -test_begin_subtest "Use last Reference" +test_begin_subtest "Use last Reference when In-Reply-To is dodgy" add_message '[id]="foo@four.com"' \ '[subject]="four"' add_message '[id]="bar@four.com"' \ '[subject]="not-four"' -add_message '[in-reply-to]=""' \ +add_message '[in-reply-to]=" (RFC822 4lyfe)"' \ '[references]=" "' \ '[subject]="neither"' output=$(notmuch show --format=json 'subject:four' | notmuch_json_show_sanitize) -- 2.18.0