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 6EC9E6DE0ABE for ; Sun, 7 May 2017 05:40:39 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.005 X-Spam-Level: X-Spam-Status: No, score=-0.005 tagged_above=-999 required=5 tests=[AWL=0.006, 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 16ej_dCxtRd6 for ; Sun, 7 May 2017 05:40:38 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id CA1036DE0350 for ; Sun, 7 May 2017 05:40:38 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1d7LTW-0003cD-GN; Sun, 07 May 2017 08:39:46 -0400 Received: (nullmailer pid 30342 invoked by uid 1000); Sun, 07 May 2017 12:40:26 -0000 From: David Bremner To: notmuch@freelists.org Cc: notmuch@notmuchmail.org, David Bremner Subject: [PATCH 05/12] test: add known broken tests for duplicate message id Date: Sun, 7 May 2017 09:40:05 -0300 Message-Id: <20170507124012.30188-6-david@tethera.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170507124012.30188-1-david@tethera.net> References: <20170507124012.30188-1-david@tethera.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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, 07 May 2017 12:40:39 -0000 There are many other problems that could be tested, but these ones we have some hope of fixing because it doesn't require UI changes, just indexing changes. --- test/T670-duplicate-mid.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 test/T670-duplicate-mid.sh diff --git a/test/T670-duplicate-mid.sh b/test/T670-duplicate-mid.sh new file mode 100755 index 00000000..ced28a21 --- /dev/null +++ b/test/T670-duplicate-mid.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +test_description="duplicate message ids" +. ./test-lib.sh || exit 1 + +add_message '[id]="duplicate"' '[subject]="message 1" [filename]=copy1' +add_message '[id]="duplicate"' '[subject]="message 2" [filename]=copy2' + +test_begin_subtest 'Search for second subject' +test_subtest_known_broken +cat <EXPECTED +MAIL_DIR/copy1 +MAIL_DIR/copy2 +EOF +notmuch search --output=files subject:'"message 2"' | notmuch_dir_sanitize > OUTPUT +test_expect_equal_file EXPECTED OUTPUT + +add_message '[id]="duplicate"' '[body]="sekrit" [filename]=copy3' +test_begin_subtest 'search for body in duplicate file' +test_subtest_known_broken +cat <EXPECTED +MAIL_DIR/copy1 +MAIL_DIR/copy2 +MAIL_DIR/copy3 +EOF +notmuch search --output=files "sekrit" | notmuch_dir_sanitize > OUTPUT +test_expect_equal_file EXPECTED OUTPUT + +test_done -- 2.11.0