Re: [PATCH 2/5] test: fix insert folder: searches
authorAustin Clements <amdragon@MIT.EDU>
Fri, 24 Jan 2014 21:20:43 +0000 (16:20 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:59:18 +0000 (09:59 -0800)
9b/f03802362fbb3c9eb52b14599cc12168ff977c [new file with mode: 0644]

diff --git a/9b/f03802362fbb3c9eb52b14599cc12168ff977c b/9b/f03802362fbb3c9eb52b14599cc12168ff977c
new file mode 100644 (file)
index 0000000..76c94ca
--- /dev/null
@@ -0,0 +1,143 @@
+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 1114E431FC3\r
+       for <notmuch@notmuchmail.org>; Fri, 24 Jan 2014 13:20:56 -0800 (PST)\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 RRh+YOCULiU0 for <notmuch@notmuchmail.org>;\r
+       Fri, 24 Jan 2014 13:20:47 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-5.mit.edu (dmz-mailsec-scanner-5.mit.edu\r
+       [18.7.68.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id A8007431FB6\r
+       for <notmuch@notmuchmail.org>; Fri, 24 Jan 2014 13:20:47 -0800 (PST)\r
+X-AuditID: 12074422-f79526d000000c47-fc-52e2d92f4397\r
+Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
+       (using TLS with cipher AES256-SHA (256/256 bits))\r
+       (Client did not present a certificate)\r
+       by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 04.4F.03143.F29D2E25; Fri, 24 Jan 2014 16:20:47 -0500 (EST)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id s0OLKjiH004687; \r
+       Fri, 24 Jan 2014 16:20:46 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s0OLKhv3021206\r
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+       Fri, 24 Jan 2014 16:20:45 -0500\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1W6oB9-0006E7-Er; Fri, 24 Jan 2014 16:20:43 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 2/5] test: fix insert folder: searches\r
+In-Reply-To:\r
+ <7eb4b4ee3345e7b166f9dd142435da32ffeffc86.1389304779.git.jani@nikula.org>\r
+References: <cover.1389304779.git.jani@nikula.org>\r
+       <7eb4b4ee3345e7b166f9dd142435da32ffeffc86.1389304779.git.jani@nikula.org>\r
+User-Agent: Notmuch/0.17~rc2+14~g06f47e0 (http://notmuchmail.org) Emacs/23.4.1\r
+       (i486-pc-linux-gnu)\r
+Date: Fri, 24 Jan 2014 16:20:43 -0500\r
+Message-ID: <87txctm5zo.fsf@awakening.csail.mit.edu>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFrrPIsWRmVeSWpSXmKPExsUixCmqrKt/81GQwYdjHBZN050trt+cyezA\r
+       5HHr/mt2j2erbjEHMEVx2aSk5mSWpRbp2yVwZew6O5utoFmsYkHvYqYGxndCXYycHBICJhIf\r
+       /n9gh7DFJC7cW88GYgsJzGaSOH44oIuRC8jeyAiUeMkI4Zxmklg04TUzhLOEUaL/8hOwdjYB\r
+       DYlt+5czgtgiAlYS5x6+Zuli5OAQBrKf/iwHCXMKhEn0PZnGDLGhRuLA7gdMILaoQJLE6am/\r
+       WUFsFgFVibnv54CN4QW6bsODj8wQtqDEyZlPWEBsZgEtiRv/XjJNYBSYhSQ1C0lqASPTKkbZ\r
+       lNwq3dzEzJzi1GTd4uTEvLzUIl1TvdzMEr3UlNJNjKBwZHdR2sH486DSIUYBDkYlHt4ZgQ+D\r
+       hFgTy4orcw8xSnIwKYnyTr38KEiILyk/pTIjsTgjvqg0J7X4EKMEB7OSCO/czUA53pTEyqrU\r
+       onyYlDQHi5I47y0O+yAhgfTEktTs1NSC1CKYrAwHh5IEr/INoEbBotT01Iq0zJwShDQTByfI\r
+       cB6g4S7XQYYXFyTmFmemQ+RPMSpKifNKgzQLgCQySvPgemHp4hWjONArwrzqIFU8wFQD1/0K\r
+       aDAT0OAVZx+ADC5JREhJNTDyPXxtHuu7YonHjq65fIZnpCcdvXdBa33O9k0HlL0NzZVf3daP\r
+       1NbcVnX84t6QG9s2uk99oedorb/2k/F3+dQARib1A0cWf/AzZHnx7J1Zxp3KrInMRkWupvc1\r
+       vHV5d1yoqZ5RFLzscXqR4XZFm9P6s3g/mSl4NNUzSE/5nJFk8DBHO0V9NocSS3FGoqEWc1Fx\r
+       IgCVNXE18gIAAA==\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: Fri, 24 Jan 2014 21:20:56 -0000\r
+\r
+This is the other reason I disagree with including cur/new.  If we strip\r
+it, people's existing folder: searches will mostly continue to work.  If\r
+we include it, such saved searches, scripted searches, and post-new\r
+hooks are guaranteed to break.\r
+\r
+On Thu, 09 Jan 2014, Jani Nikula <jani@nikula.org> wrote:\r
+> folder: is now boolean prefix.\r
+> ---\r
+>  test/insert | 10 +++++-----\r
+>  1 file changed, 5 insertions(+), 5 deletions(-)\r
+>\r
+> diff --git a/test/insert b/test/insert\r
+> index e8dc4c0..4bbccd5 100755\r
+> --- a/test/insert\r
+> +++ b/test/insert\r
+> @@ -126,14 +126,14 @@ test_expect_equal "$dirname" "$MAIL_DIR/new"\r
+>  test_begin_subtest "Insert message into folder"\r
+>  gen_insert_msg\r
+>  notmuch insert --folder=Drafts < "$gen_msg_filename"\r
+> -output=$(notmuch search --output=files folder:Drafts)\r
+> +output=$(notmuch search --output=files folder:Drafts/new)\r
+>  dirname=$(dirname "$output")\r
+>  test_expect_equal "$dirname" "$MAIL_DIR/Drafts/new"\r
+>  \r
+>  test_begin_subtest "Insert message into folder, add/remove tags"\r
+>  gen_insert_msg\r
+>  notmuch insert --folder=Drafts +draft -unread < "$gen_msg_filename"\r
+> -output=$(notmuch search --output=messages folder:Drafts tag:draft NOT tag:unread)\r
+> +output=$(notmuch search --output=messages folder:Drafts/cur tag:draft NOT tag:unread)\r
+>  test_expect_equal "$output" "id:$gen_msg_id"\r
+>  \r
+>  gen_insert_msg\r
+> @@ -143,21 +143,21 @@ test_expect_code 1 "Insert message into non-existent folder" \\r
+>  test_begin_subtest "Insert message, create folder"\r
+>  gen_insert_msg\r
+>  notmuch insert --folder=F --create-folder +folder < "$gen_msg_filename"\r
+> -output=$(notmuch search --output=files folder:F tag:folder)\r
+> +output=$(notmuch search --output=files folder:F/new tag:folder)\r
+>  basename=$(basename "$output")\r
+>  test_expect_equal_file "$gen_msg_filename" "$MAIL_DIR/F/new/${basename}"\r
+>  \r
+>  test_begin_subtest "Insert message, create subfolder"\r
+>  gen_insert_msg\r
+>  notmuch insert --folder=F/G/H/I/J --create-folder +folder < "$gen_msg_filename"\r
+> -output=$(notmuch search --output=files folder:F/G/H/I/J tag:folder)\r
+> +output=$(notmuch search --output=files folder:F/G/H/I/J/new tag:folder)\r
+>  basename=$(basename "$output")\r
+>  test_expect_equal_file "$gen_msg_filename" "${MAIL_DIR}/F/G/H/I/J/new/${basename}"\r
+>  \r
+>  test_begin_subtest "Insert message, create existing subfolder"\r
+>  gen_insert_msg\r
+>  notmuch insert --folder=F/G/H/I/J --create-folder +folder < "$gen_msg_filename"\r
+> -output=$(notmuch count folder:F/G/H/I/J tag:folder)\r
+> +output=$(notmuch count folder:F/G/H/I/J/new tag:folder)\r
+>  test_expect_equal "$output" "2"\r
+>  \r
+>  gen_insert_msg\r
+> -- \r
+> 1.8.5.2\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r