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 ADAF56DE00B4 for ; Tue, 8 Aug 2017 09:35:17 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[AWL=0.011, 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 hPbiKfZjuixW for ; Tue, 8 Aug 2017 09:35:17 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 007026DE0ACB for ; Tue, 8 Aug 2017 09:35:16 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1df7Q3-00048G-Ui; Tue, 08 Aug 2017 12:31:47 -0400 Received: (nullmailer pid 25727 invoked by uid 1000); Tue, 08 Aug 2017 16:35:13 -0000 From: David Bremner To: notmuch@notmuchmail.org, notmuch@freelists.org Subject: [PATCH 2/2] test: add test for , S message without 'unread' in new.tags Date: Tue, 8 Aug 2017 12:35:08 -0400 Message-Id: <20170808163508.25658-3-david@tethera.net> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170808163508.25658-1-david@tethera.net> References: <20170808163508.25658-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: Tue, 08 Aug 2017 16:35:17 -0000 This is arguably overkill, but it helps to understand the complicated interactions here between maildir tags and configuration. --- test/T340-maildir-sync.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/T340-maildir-sync.sh b/test/T340-maildir-sync.sh index 2041e1a0..433effef 100755 --- a/test/T340-maildir-sync.sh +++ b/test/T340-maildir-sync.sh @@ -28,6 +28,14 @@ add_message [subject]='"Adding message with S"' [filename]='adding-with-s-flag:2 output=$(notmuch search subject:"Adding message with S" | notmuch_search_sanitize) test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Adding message with S (inbox)" +test_begin_subtest "Adding message with 'S' w/o 'unread' in new.tags prevents 'unread' tag" +OLDCONFIG=$(notmuch config get new.tags) +notmuch config set new.tags "inbox" +add_message [subject]='"Adding message with S 2"' [filename]='adding-with-s-flag2:2,S' [dir]=cur +notmuch config set new.tags $OLDCONFIG +output=$(notmuch search subject:Adding-message-with-S-2 | notmuch_search_sanitize) +test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Adding message with S 2 (inbox)" + test_begin_subtest "Adding 'replied' tag adds 'R' flag to filename" add_message [subject]='"Adding replied tag"' [filename]='adding-replied-tag:2,S' [dir]=cur notmuch tag +replied subject:"Adding replied tag" @@ -49,7 +57,7 @@ test_expect_equal_json "$output" '[[[{"id": "XXXXX", "Date": "GENERATED_DATE"}, "body": [{"id": 1, "content-type": "text/plain", -"content": "This is just a test message (#3)\n"}]}, +"content": "This is just a test message (#4)\n"}]}, []]]]' test_begin_subtest "notmuch reply works with renamed file (without notmuch new)" -- 2.13.2