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