From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D1AD3431FBF for ; Sat, 9 Jun 2012 12:14:58 -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 AScWBoe4KMxV for ; Sat, 9 Jun 2012 12:14:58 -0700 (PDT) Received: from dmz-mailsec-scanner-6.mit.edu (DMZ-MAILSEC-SCANNER-6.MIT.EDU [18.7.68.35]) by olra.theworths.org (Postfix) with ESMTP id 691B3431FC0 for ; Sat, 9 Jun 2012 12:14:55 -0700 (PDT) X-AuditID: 12074423-b7f396d0000008f4-31-4fd3a0ae42fc Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP id 3C.C4.02292.EA0A3DF4; Sat, 9 Jun 2012 15:14:54 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q59JErQX015440; Sat, 9 Jun 2012 15:14:53 -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 q59JEqLI026103 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Sat, 9 Jun 2012 15:14:53 -0400 (EDT) Received: from amthrax by drake.dyndns.org with local (Exim 4.77) (envelope-from ) id 1SdR75-0000wn-Kg; Sat, 09 Jun 2012 15:14:19 -0400 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH v2 1/5] test: Add broken test for tag synchronization on files delivered to new/ Date: Sat, 9 Jun 2012 15:14:14 -0400 Message-Id: <1339269258-3542-2-git-send-email-amdragon@mit.edu> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1339269258-3542-1-git-send-email-amdragon@mit.edu> References: <1338742656-11640-1-git-send-email-amdragon@mit.edu> <1339269258-3542-1-git-send-email-amdragon@mit.edu> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrOIsWRmVeSWpSXmKPExsUixCmqrLtuwWV/g7nnjC2apjtbXL85k9mB yePW/dfsHs9W3WIOYIrisklJzcksSy3St0vgyrg+9TVbwR6+ipXP7zM3ME7g6WLk5JAQMJF4 MOkwO4QtJnHh3no2EFtIYB+jxJa/2V2MXED2ekaJ1mszGSGch0wSOyavZIVw5jJKnP5+lwmk hU1AQ2Lb/uWMILaIgLTEzruzgYo4OJgFzCVutsSBhIUFEiT2LGoFK2cRUJVYOm8PM4jNK2Av 0btxEiPEFfIST+/3gV3BKeAg8ez7dEaIi8oknp2ezTaBkX8BI8MqRtmU3Crd3MTMnOLUZN3i 5MS8vNQiXTO93MwSvdSU0k2MoDBid1HewfjnoNIhRgEORiUeXi35S/5CrIllxZW5hxglOZiU RHm/zL/sL8SXlJ9SmZFYnBFfVJqTWnyIUYKDWUmEdysTUDlvSmJlVWpRPkxKmoNFSZw3heus v5BAemJJanZqakFqEUxWhoNDSYLXCBgvQoJFqempFWmZOSUIaSYOTpDhPEDD34As5i0uSMwt zkyHyJ9i1OU4PenSdUYhlrz8vFQpcV5TkEECIEUZpXlwc2Dx/4pRHOgtYd6fIKN4gKkDbtIr oCVMQEtaoy6ALClJREhJNTCqcyTszAjKzvk0ufzOyy1yRT0nxF8/U+5QPXVY/K6H3r5LFya2 1r/qPXLP9NS6i7zbTHJ/SqVd8nh5dUthbV299kTHi6kunId7hH6pNh+UdpY3OHGf/9KN901s TFsC/X4VKhts2+6gLvRlNt/FSra9Z06f1/m298OUM9IP5qZdsdto+bNYh2WuEktxRqKhFnNR cSIA6NS1P9oCAAA= 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: Sat, 09 Jun 2012 19:14:59 -0000 Currently, notmuch new only synchronizes 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