From: David Bremner Date: Sat, 8 Mar 2014 21:19:33 +0000 (+2000) Subject: [Patch v3 03/15] test: make insert test use the path: prefix X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=32cec1af8ad717568cbb943f8223e5589dce4509;p=notmuch-archives.git [Patch v3 03/15] test: make insert test use the path: prefix --- diff --git a/d6/45f1dc2a81b277a5c796bcf2c792a4df5d3734 b/d6/45f1dc2a81b277a5c796bcf2c792a4df5d3734 new file mode 100644 index 000000000..730d669e8 --- /dev/null +++ b/d6/45f1dc2a81b277a5c796bcf2c792a4df5d3734 @@ -0,0 +1,104 @@ +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 769B2431FD9 + for ; Sat, 8 Mar 2014 13:21:14 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 r866qJ+aEpIZ for ; + Sat, 8 Mar 2014 13:21:09 -0800 (PST) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 09233431FD8 + for ; Sat, 8 Mar 2014 13:20:34 -0800 (PST) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1WMOfZ-00058y-F2; Sat, 08 Mar 2014 17:20:33 -0400 +Received: (nullmailer pid 28532 invoked by uid 1000); Sat, 08 Mar 2014 + 21:20:03 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [Patch v3 03/15] test: make insert test use the path: prefix +Date: Sat, 8 Mar 2014 17:19:33 -0400 +Message-Id: <1394313585-28422-4-git-send-email-david@tethera.net> +X-Mailer: git-send-email 1.8.5.3 +In-Reply-To: <1394313585-28422-1-git-send-email-david@tethera.net> +References: <1394313585-28422-1-git-send-email-david@tethera.net> +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, 08 Mar 2014 21:21:14 -0000 + +From: Jani Nikula + +This is a more strict test for the insert test. +--- + test/T070-insert.sh | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/test/T070-insert.sh b/test/T070-insert.sh +index b77c5e1..ea9db07 100755 +--- a/test/T070-insert.sh ++++ b/test/T070-insert.sh +@@ -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 path: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 path: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 path: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 path: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 path:F/G/H/I/J/new tag:folder) + test_expect_equal "$output" "2" + + gen_insert_msg +-- +1.8.5.3 +