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 07578431FB6 for ; Sun, 3 Jun 2012 09:58:15 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 yLDV6ybHZQ5W for ; Sun, 3 Jun 2012 09:58:14 -0700 (PDT) Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU [18.7.68.34]) by olra.theworths.org (Postfix) with ESMTP id 6BD4F431FAE for ; Sun, 3 Jun 2012 09:58:14 -0700 (PDT) X-AuditID: 12074422-b7f1f6d00000090b-64-4fcb97a540a1 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP id 87.47.02315.5A79BCF4; Sun, 3 Jun 2012 12:58:14 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id q53GwDUE027666; Sun, 3 Jun 2012 12:58:13 -0400 Received: from drake.dyndns.org (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com [209.6.116.242]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q53GwCTE004200 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Sun, 3 Jun 2012 12:58:12 -0400 (EDT) Received: from amthrax by drake.dyndns.org with local (Exim 4.77) (envelope-from ) id 1SbE7j-00037o-3B; Sun, 03 Jun 2012 12:57:51 -0400 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH 1/4] test: Add broken test for tag synchronization on files delivered to new/ Date: Sun, 3 Jun 2012 12:57:33 -0400 Message-Id: <1338742656-11640-2-git-send-email-amdragon@mit.edu> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1338742656-11640-1-git-send-email-amdragon@mit.edu> References: <1338742656-11640-1-git-send-email-amdragon@mit.edu> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsUixG6norts+ml/gysuFtdvzmR2YPR4tuoW cwBjFJdNSmpOZllqkb5dAlfGsXUb2Qt281UsOX+IrYGxn6eLkZNDQsBEomH7ZSYIW0ziwr31 bF2MXBxCAvsYJfbv+s8I4axnlLj7azYrhPOQSWLhmRdQzlxGifPnFrGC9LMJaEhs27+cEcQW EZCW2HkXpIODg1lATeJPlwpIWFggVmLt5U9sIDaLgKrExwd3wMp5BRwk/lx/zQhxhrzE0/t9 bCCtnAKOEr0HTEDCQkAlHxqusE9g5F/AyLCKUTYlt0o3NzEzpzg1Wbc4OTEvL7VI11QvN7NE LzWldBMjOGRclHYw/jyodIhRgINRiYf306xT/kKsiWXFlbmHGCU5mJREeadNPe0vxJeUn1KZ kVicEV9UmpNafIhRgoNZSYS30w4ox5uSWFmVWpQPk5LmYFES512judtfSCA9sSQ1OzW1ILUI JivDwaEkwXt+GlCjYFFqempFWmZOCUKaiYMTZDgP0HCwGt7igsTc4sx0iPwpRl2O05MuXWcU YsnLz0uVEue9BlIkAFKUUZoHNwcW668YxYHeEuZ9CVLFA0wTcJNeAS1hAlpicPgkyJKSRISU VAPjxOVJ2z8svLtUIa/+KdO5X/7fWV+2SawtY1tb2qv6fVftl4zw7qUXd9nMUX/5VH/F9/U5 z8UWTb/xYbu6gqPm/8vd9rNW78/1DOipXGteeuXaCbXJ+/64Gr9Zv+3OjXfqBhWdh9VW62is v1i1taHHh1vq3Yf/z6RyXlm4LTi8cs7hqrezHjrZ/VNiKc5INNRiLipOBAAELFiN0AIAAA== 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: Sun, 03 Jun 2012 16:58:15 -0000 Currently, notmuch new only synchronizs maildir flags to tags for files that have an "info" part. However, in maildir, new mail doesn't gain the info part until it moves from new/ to cur/. Hence, even though mail in new/ doesn't have an info part, it is still a maildir message and thus has maildir flags (though none of them set). The most visible effect of not synchronizing maildir flags for messages in new/ is that newly delivered messages don't get the unread tag (unless it is assigned by some other mechanism, like new.tags). This patch does *not* modify the test for messages in cur/ that do not have an "info" part. Unlike a message in new/, a message in cur/ without an info part is no longer a maildir message, and thus shouldn't be subject to maildir flag synchronization. --- test/maildir-sync | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/maildir-sync b/test/maildir-sync index d72ec07..6360fd2 100755 --- a/test/maildir-sync +++ b/test/maildir-sync @@ -166,4 +166,14 @@ add_message [subject]='"Non-compliant maildir info"' [dir]=cur [filename]='non-c notmuch tag +unread +draft -flagged subject:"Non-compliant maildir info" test_expect_equal "$(cd $MAIL_DIR/cur/; ls non-compliant*)" "non-compliant-maildir-info:2,These-are-not-flags-in-ASCII-order-donottouch" +test_begin_subtest "Files in new/ get default synchronized tags" +test_subtest_known_broken +OLDCONFIG=$(notmuch config get new.tags) +notmuch config set new.tags test +add_message [subject]='"File in new/"' [dir]=new [filename]='file-in-new' +notmuch config set new.tags $OLDCONFIG +notmuch search 'subject:"File in new"' | notmuch_search_sanitize > output +test_expect_equal "$(< output)" \ +"thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; File in new/ (test unread)" + test_done -- 1.7.10