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 1B031431FC2 for ; Sun, 9 Mar 2014 14:41:21 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" 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 0FUhp-Lzv+GL for ; Sun, 9 Mar 2014 14:41:15 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com [209.85.215.50]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 6D448431FD2 for ; Sun, 9 Mar 2014 14:40:52 -0700 (PDT) Received: by mail-la0-f50.google.com with SMTP id y1so4116527lam.37 for ; Sun, 09 Mar 2014 14:40:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=3GQNnolPfjkpUl2rhF7DeR0Imw41AIIKbLA7J/KTrnc=; b=j8PSj5OtznnWTbTcHyaNyQt1sS4YveH8PmwGp+p5UqC5yCFwi9YhwS1/uhWT+/AFtP zoT+w+Qo464ZF2DXlXQvh7CwNB0Q2CVPheMhTmvDQSzHINFhnCdqOb6BfAUmSXwRloHN GEFcs+30DNlWyVgw8m3E88EIGUO1p7O3BCNhgGjHIYEFSU5y5MBe4oTDUreeyar4zZni 3+BfwMvv2muTUBleRjn/dcqiwchcdCMU0jgRm/liXd94H8xBxLfLNxt1ZsndMjvRk8gd 3BKnCGk15Ok2ibMk/xj40IsD0CpWgcE/d/7CfTRH10IOA6JnVEqfJk8IGPCUy82xP/En ESPw== X-Gm-Message-State: ALoCoQkRIeWRaupJP/08TxzsF4dCXu1ataS6apf6PU8kdjvRTlUOi7mZ/IrjQ8BKhIkby6krCDit X-Received: by 10.152.23.39 with SMTP id j7mr7090130laf.35.1394401249874; Sun, 09 Mar 2014 14:40:49 -0700 (PDT) Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. [88.195.111.91]) by mx.google.com with ESMTPSA id sx1sm26916600lac.1.2014.03.09.14.40.48 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 09 Mar 2014 14:40:49 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH v4 05/13] test: make insert test use the path: prefix Date: Sun, 9 Mar 2014 23:40:26 +0200 Message-Id: <5b766663f139acec8448cb38dcfc8b6358bcc6bc.1394400503.git.jani@nikula.org> X-Mailer: git-send-email 1.9.0 In-Reply-To: References: In-Reply-To: References: 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: Sun, 09 Mar 2014 21:41:21 -0000 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 b77c5e13c87f..ea9db07e2fa2 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.9.0