1 Return-Path: <novalazy@gmail.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 97081431FAE
\r
6 for <notmuch@notmuchmail.org>; Thu, 24 Jan 2013 04:10:07 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id PyhBLxUJtjyx for <notmuch@notmuchmail.org>;
\r
17 Thu, 24 Jan 2013 04:10:05 -0800 (PST)
\r
18 Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com
\r
19 [209.85.220.44]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id C5526431FDB
\r
22 for <notmuch@notmuchmail.org>; Thu, 24 Jan 2013 04:09:59 -0800 (PST)
\r
23 Received: by mail-pa0-f44.google.com with SMTP id hz11so5463313pad.31
\r
24 for <notmuch@notmuchmail.org>; Thu, 24 Jan 2013 04:09:59 -0800 (PST)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to
\r
27 :references; bh=cxDsnDrvNG3VLmMlXpW4HjF9n69aOLUvC7UC4Jv7wzs=;
\r
28 b=Z9+Db27xwBL71va9z13hLscbcwOkaz3T6RqiswxZFQS6qppm7TnphFQmsKF+qiHq/b
\r
29 WHESshR9FCKz3H8i9nn4ZBZWO3NRNSY1eDQdAF4Fl75u+8i7hkj8lqHitKcw4LuGkE3R
\r
30 bXq/UTfSk/DHAZwpP7nEKIBNXXUnslE3u4qkb4fqHVsKvqwsvf2P3jkOUaA+CMuR6vvY
\r
31 IqTr99PGWOdvw0rvo+yY9AqrLtca7/WjIDggItcLRdKzdNvokGAaJZFrP4q/acB+tNNE
\r
32 MvxDZOFMhOxdGSX1DRVQ1/OWZhO4bZ3XSxWcoOMzJnwXCkJ7oU/1p+1kClWgg7zCtft7
\r
34 X-Received: by 10.66.84.10 with SMTP id u10mr4156219pay.24.1359029399041;
\r
35 Thu, 24 Jan 2013 04:09:59 -0800 (PST)
\r
36 Received: from localhost (215.42.233.220.static.exetel.com.au.
\r
38 by mx.google.com with ESMTPS id i6sm15601989paw.19.2013.01.24.04.09.57
\r
39 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
40 Thu, 24 Jan 2013 04:09:58 -0800 (PST)
\r
41 From: Peter Wang <novalazy@gmail.com>
\r
42 To: notmuch@notmuchmail.org
\r
43 Subject: [PATCH v4 09/12] test: test insert --folder option
\r
44 Date: Thu, 24 Jan 2013 23:08:05 +1100
\r
45 Message-Id: <1359029288-12132-10-git-send-email-novalazy@gmail.com>
\r
46 X-Mailer: git-send-email 1.7.12.1
\r
47 In-Reply-To: <1359029288-12132-1-git-send-email-novalazy@gmail.com>
\r
48 References: <1359029288-12132-1-git-send-email-novalazy@gmail.com>
\r
49 X-BeenThere: notmuch@notmuchmail.org
\r
50 X-Mailman-Version: 2.1.13
\r
52 List-Id: "Use and development of the notmuch mail system."
\r
53 <notmuch.notmuchmail.org>
\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
57 List-Post: <mailto:notmuch@notmuchmail.org>
\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
61 X-List-Received-Date: Thu, 24 Jan 2013 12:10:08 -0000
\r
63 Add tests for notmuch insert --folder option.
\r
65 test/insert | 17 +++++++++++++++++
\r
66 1 file changed, 17 insertions(+)
\r
68 diff --git a/test/insert b/test/insert
\r
69 index d880af9..44e071c 100755
\r
72 @@ -66,4 +66,21 @@ notmuch insert +custom -unread < "$gen_msg_filename"
\r
73 output=$(notmuch count tag:custom NOT tag:unread)
\r
74 test_expect_equal "$output" "1"
\r
76 +test_begin_subtest "Insert message, folder"
\r
78 +notmuch insert --folder=Drafts < "$gen_msg_filename"
\r
79 +output=$(notmuch search --output=files folder:Drafts)
\r
80 +dirname=$(dirname "$output")
\r
81 +test_expect_equal "$dirname" "$MAIL_DIR/Drafts/cur"
\r
83 +test_begin_subtest "Insert message, folder and tags"
\r
85 +notmuch insert --folder=Drafts +draft -unread < "$gen_msg_filename"
\r
86 +output=$(notmuch count folder:Drafts tag:draft NOT tag:unread)
\r
87 +test_expect_equal "$output" "1"
\r
90 +test_expect_code 1 "Insert message, non-existent folder" \
\r
91 + "notmuch insert --folder=nonesuch < $gen_msg_filename"
\r