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 C1E1B6DE02CB for ; Mon, 30 Jul 2018 15:46:50 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=5 tests=[AWL=0.012, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 Y_lwTw4U5PyF for ; Mon, 30 Jul 2018 15:46:50 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 96F296DE028C for ; Mon, 30 Jul 2018 15:46:44 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1fkGw7-0002Dh-R3; Mon, 30 Jul 2018 18:46:43 -0400 Received: (nullmailer pid 28741 invoked by uid 1000); Mon, 30 Jul 2018 22:45:56 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH 10/15] test: add known broken test for good In-Reply-To / bad References Date: Tue, 31 Jul 2018 06:45:50 +0800 Message-Id: <20180730224555.26047-11-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> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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:50 -0000 The current scheme of choosing the replyto (i.e. the default parent for threading purposes) does not work well for mailers that put the oldest Reference last. --- test/T510-thread-replies.sh | 15 +++++++++++++++ test/corpora/threading/parent-priority/cur/child | 11 +++++++++++ .../threading/parent-priority/cur/grand-child | 10 ++++++++++ test/corpora/threading/parent-priority/cur/root | 7 +++++++ 4 files changed, 43 insertions(+) create mode 100644 test/corpora/threading/parent-priority/cur/child create mode 100644 test/corpora/threading/parent-priority/cur/grand-child create mode 100644 test/corpora/threading/parent-priority/cur/root diff --git a/test/T510-thread-replies.sh b/test/T510-thread-replies.sh index 84a3e6e8..4d0e0665 100755 --- a/test/T510-thread-replies.sh +++ b/test/T510-thread-replies.sh @@ -189,4 +189,19 @@ End of search results. EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "trusting reply-to (tree view)" +test_subtest_known_broken +test_emacs '(notmuch-tree "id:B00-root@example.org") + (notmuch-test-wait) + (test-output) + (delete-other-windows)' +cat < EXPECTED + 2016-06-17 Alice ┬►root message (inbox unread) + 2016-06-18 Alice ╰┬►child message (inbox unread) + 2016-06-18 Alice ╰─►grand-child message (inbox unread) +End of search results. +EOF +test_expect_equal_file EXPECTED OUTPUT + + test_done diff --git a/test/corpora/threading/parent-priority/cur/child b/test/corpora/threading/parent-priority/cur/child new file mode 100644 index 00000000..23ee6495 --- /dev/null +++ b/test/corpora/threading/parent-priority/cur/child @@ -0,0 +1,11 @@ +From: Alice +To: Daniel +Subject: child message +Message-ID: +In-Reply-To: +References: +Date: Fri, 17 Jun 2016 22:14:41 -0400 + +This is a normal-ish reply, and has both a references header and an +in-reply-to header. + diff --git a/test/corpora/threading/parent-priority/cur/grand-child b/test/corpora/threading/parent-priority/cur/grand-child new file mode 100644 index 00000000..028371d4 --- /dev/null +++ b/test/corpora/threading/parent-priority/cur/grand-child @@ -0,0 +1,10 @@ +From: Alice +To: Daniel +Subject: grand-child message +Message-ID: +In-Reply-To: +References: +Date: Fri, 17 Jun 2016 22:24:41 -0400 + +This has the references headers in the wrong order, with oldest first. +Debbugs does this. diff --git a/test/corpora/threading/parent-priority/cur/root b/test/corpora/threading/parent-priority/cur/root new file mode 100644 index 00000000..3990843d --- /dev/null +++ b/test/corpora/threading/parent-priority/cur/root @@ -0,0 +1,7 @@ +From: Alice +To: Daniel +Subject: root message +Message-ID: +Date: Thu, 16 Jun 2016 22:14:41 -0400 + +This message has no reply-to -- 2.18.0