[PATCH v2 1/5] test: Add broken test for tag synchronization on files delivered to...
authorAustin Clements <amdragon@MIT.EDU>
Sat, 9 Jun 2012 19:14:14 +0000 (15:14 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:47:38 +0000 (09:47 -0800)
60/dc96886113392eba52b32a1c1c17b69b606ece [new file with mode: 0644]

diff --git a/60/dc96886113392eba52b32a1c1c17b69b606ece b/60/dc96886113392eba52b32a1c1c17b69b606ece
new file mode 100644 (file)
index 0000000..43d48c2
--- /dev/null
@@ -0,0 +1,115 @@
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id D1AD3431FBF\r
+       for <notmuch@notmuchmail.org>; Sat,  9 Jun 2012 12:14:58 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id AScWBoe4KMxV for <notmuch@notmuchmail.org>;\r
+       Sat,  9 Jun 2012 12:14:58 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-6.mit.edu (DMZ-MAILSEC-SCANNER-6.MIT.EDU\r
+       [18.7.68.35])\r
+       by olra.theworths.org (Postfix) with ESMTP id 691B3431FC0\r
+       for <notmuch@notmuchmail.org>; Sat,  9 Jun 2012 12:14:55 -0700 (PDT)\r
+X-AuditID: 12074423-b7f396d0000008f4-31-4fd3a0ae42fc\r
+Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
+       by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 3C.C4.02292.EA0A3DF4; Sat,  9 Jun 2012 15:14:54 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q59JErQX015440; \r
+       Sat, 9 Jun 2012 15:14:53 -0400\r
+Received: from drake.dyndns.org\r
+       (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
+       [209.6.116.242]) (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q59JEqLI026103\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Sat, 9 Jun 2012 15:14:53 -0400 (EDT)\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1SdR75-0000wn-Kg; Sat, 09 Jun 2012 15:14:19 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 1/5] test: Add broken test for tag synchronization on files\r
+       delivered to new/\r
+Date: Sat,  9 Jun 2012 15:14:14 -0400\r
+Message-Id: <1339269258-3542-2-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.10\r
+In-Reply-To: <1339269258-3542-1-git-send-email-amdragon@mit.edu>\r
+References: <1338742656-11640-1-git-send-email-amdragon@mit.edu>\r
+       <1339269258-3542-1-git-send-email-amdragon@mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFjrOIsWRmVeSWpSXmKPExsUixCmqrLtuwWV/g7nnjC2apjtbXL85k9mB\r
+       yePW/dfsHs9W3WIOYIrisklJzcksSy3St0vgyrg+9TVbwR6+ipXP7zM3ME7g6WLk5JAQMJF4\r
+       MOkwO4QtJnHh3no2EFtIYB+jxJa/2V2MXED2ekaJ1mszGSGch0wSOyavZIVw5jJKnP5+lwmk\r
+       hU1AQ2Lb/uWMILaIgLTEzruzgYo4OJgFzCVutsSBhIUFEiT2LGoFK2cRUJVYOm8PM4jNK2Av\r
+       0btxEiPEFfIST+/3gV3BKeAg8ez7dEaIi8oknp2ezTaBkX8BI8MqRtmU3Crd3MTMnOLUZN3i\r
+       5MS8vNQiXTO93MwSvdSU0k2MoDBid1HewfjnoNIhRgEORiUeXi35S/5CrIllxZW5hxglOZiU\r
+       RHm/zL/sL8SXlJ9SmZFYnBFfVJqTWnyIUYKDWUmEdysTUDlvSmJlVWpRPkxKmoNFSZw3heus\r
+       v5BAemJJanZqakFqEUxWhoNDSYLXCBgvQoJFqempFWmZOSUIaSYOTpDhPEDD34As5i0uSMwt\r
+       zkyHyJ9i1OU4PenSdUYhlrz8vFQpcV5TkEECIEUZpXlwc2Dx/4pRHOgtYd6fIKN4gKkDbtIr\r
+       oCVMQEtaoy6ALClJREhJNTCqcyTszAjKzvk0ufzOyy1yRT0nxF8/U+5QPXVY/K6H3r5LFya2\r
+       1r/qPXLP9NS6i7zbTHJ/SqVd8nh5dUthbV299kTHi6kunId7hH6pNh+UdpY3OHGf/9KN901s\r
+       TFsC/X4VKhts2+6gLvRlNt/FSra9Z06f1/m298OUM9IP5qZdsdto+bNYh2WuEktxRqKhFnNR\r
+       cSIA6NS1P9oCAAA=\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 09 Jun 2012 19:14:59 -0000\r
+\r
+Currently, notmuch new only synchronizes maildir flags to tags for\r
+files that have an "info" part.  However, in maildir, new mail doesn't\r
+gain the info part until it moves from new/ to cur/.  Hence, even\r
+though mail in new/ doesn't have an info part, it is still a maildir\r
+message and thus has maildir flags (though none of them set).\r
+\r
+The most visible effect of not synchronizing maildir flags for\r
+messages in new/ is that newly delivered messages don't get the unread\r
+tag (unless it is assigned by some other mechanism, like new.tags).\r
+\r
+This patch does *not* modify the test for messages in cur/ that do not\r
+have an "info" part.  Unlike a message in new/, a message in cur/\r
+without an info part is no longer a maildir message, and thus\r
+shouldn't be subject to maildir flag synchronization.\r
+---\r
+ test/maildir-sync |   10 ++++++++++\r
+ 1 file changed, 10 insertions(+)\r
+\r
+diff --git a/test/maildir-sync b/test/maildir-sync\r
+index d72ec07..6360fd2 100755\r
+--- a/test/maildir-sync\r
++++ b/test/maildir-sync\r
+@@ -166,4 +166,14 @@ add_message [subject]='"Non-compliant maildir info"' [dir]=cur [filename]='non-c\r
+ notmuch tag +unread +draft -flagged subject:"Non-compliant maildir info"\r
+ test_expect_equal "$(cd $MAIL_DIR/cur/; ls non-compliant*)" "non-compliant-maildir-info:2,These-are-not-flags-in-ASCII-order-donottouch"\r
\r
++test_begin_subtest "Files in new/ get default synchronized tags"\r
++test_subtest_known_broken\r
++OLDCONFIG=$(notmuch config get new.tags)\r
++notmuch config set new.tags test\r
++add_message [subject]='"File in new/"' [dir]=new [filename]='file-in-new'\r
++notmuch config set new.tags $OLDCONFIG\r
++notmuch search 'subject:"File in new"' | notmuch_search_sanitize > output\r
++test_expect_equal "$(< output)" \\r
++"thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; File in new/ (test unread)"\r
++\r
+ test_done\r
+-- \r
+1.7.10\r
+\r