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 0052D431FD0 for ; Tue, 11 Mar 2014 16:03:39 -0700 (PDT) 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 d+JqmmAnPlEq for ; Tue, 11 Mar 2014 16:03:35 -0700 (PDT) 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 E1072429E35 for ; Tue, 11 Mar 2014 16:02:38 -0700 (PDT) Received: from remotemail by yantan.tethera.net with local (Exim 4.80) (envelope-from ) id 1WNVh0-0001wS-5L; Tue, 11 Mar 2014 20:02:38 -0300 Received: (nullmailer pid 25851 invoked by uid 1000); Tue, 11 Mar 2014 23:01:46 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [Patch v6 06/14] test: make insert test use the path: prefix Date: Tue, 11 Mar 2014 20:01:32 -0300 Message-Id: <1394578900-25618-7-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1394578900-25618-1-git-send-email-david@tethera.net> References: <1394578900-25618-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: Tue, 11 Mar 2014 23:03:39 -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