Re: [feature request] emacs: use `notmuch insert` for FCC
[notmuch-archives.git] / 76 / 031a401ff972e6bfae46768336c202e962955e
1 Return-Path: <bremner@tethera.net>\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 10B47431FAF\r
6         for <notmuch@notmuchmail.org>; Sun, 18 Nov 2012 11:05:37 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id epfwhzL0JVcV for <notmuch@notmuchmail.org>;\r
16         Sun, 18 Nov 2012 11:05:35 -0800 (PST)\r
17 Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])\r
18         (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id E49A5431E84\r
21         for <notmuch@notmuchmail.org>; Sun, 18 Nov 2012 11:05:19 -0800 (PST)\r
22 Received: from fctnnbsc30w-156034089108.dhcp-dynamic.fibreop.nb.bellaliant.net\r
23         ([156.34.89.108] helo=zancas.localnet)\r
24         by tesseract.cs.unb.ca with esmtpsa\r
25         (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72)\r
26         (envelope-from <bremner@tethera.net>)\r
27         id 1TaABC-00028A-EE; Sun, 18 Nov 2012 15:05:18 -0400\r
28 Received: from bremner by zancas.localnet with local (Exim 4.80)\r
29         (envelope-from <bremner@tethera.net>)\r
30         id 1TaAB6-0001It-Tp; Sun, 18 Nov 2012 15:05:12 -0400\r
31 From: david@tethera.net\r
32 To: notmuch@notmuchmail.org\r
33 Subject: [PATCH 10/16] test: add test for notmuch tag --batch option\r
34 Date: Sun, 18 Nov 2012 15:04:52 -0400\r
35 Message-Id: <1353265498-3839-11-git-send-email-david@tethera.net>\r
36 X-Mailer: git-send-email 1.7.10.4\r
37 In-Reply-To: <1353265498-3839-1-git-send-email-david@tethera.net>\r
38 References: <1353265498-3839-1-git-send-email-david@tethera.net>\r
39 X-Spam_bar: -\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.13\r
42 Precedence: list\r
43 List-Id: "Use and development of the notmuch mail system."\r
44         <notmuch.notmuchmail.org>\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
48 List-Post: <mailto:notmuch@notmuchmail.org>\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
52 X-List-Received-Date: Sun, 18 Nov 2012 19:05:37 -0000\r
53 \r
54 From: Jani Nikula <jani@nikula.org>\r
55 \r
56 Basic test of functionality, along with all combinations of options.\r
57 ---\r
58  test/tagging |   35 +++++++++++++++++++++++++++++++++++\r
59  1 file changed, 35 insertions(+)\r
60 \r
61 diff --git a/test/tagging b/test/tagging\r
62 index 980ff92..574bc10 100755\r
63 --- a/test/tagging\r
64 +++ b/test/tagging\r
65 @@ -46,6 +46,41 @@ test_expect_equal "$output" "\\r
66  thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (:\"  inbox tag1 unread)\r
67  thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag4 unread)"\r
68  \r
69 +test_begin_subtest "--batch"\r
70 +notmuch tag --batch <<EOF\r
71 +# %20 is a space in tag\r
72 +-:"%20 -tag1 +tag5 +tag6 -- One\r
73 ++tag1 -tag1 -tag4 +tag4 -- Two\r
74 +-tag6 One\r
75 ++tag5 Two\r
76 +EOF\r
77 +output=$(notmuch search \* | notmuch_search_sanitize)\r
78 +test_expect_equal "$output" "\\r
79 +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag5 unread)\r
80 +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag4 tag5 unread)"\r
81 +\r
82 +> batch.in  <<EOF\r
83 +# %20 is a space in tag\r
84 +-:"%20 -tag1 +tag5 +tag6 -- One\r
85 ++tag1 -tag1 -tag4 +tag4 -- Two\r
86 +-tag6 One\r
87 ++tag5 Two\r
88 +EOF\r
89 +\r
90 +test_begin_subtest "--input"\r
91 +notmuch tag --input=batch.in\r
92 +output=$(notmuch search \* | notmuch_search_sanitize)\r
93 +test_expect_equal "$output" "\\r
94 +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag5 unread)\r
95 +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag4 tag5 unread)"\r
96 +\r
97 +test_begin_subtest "--batch --input"\r
98 +notmuch tag --batch --input=batch.in\r
99 +output=$(notmuch search \* | notmuch_search_sanitize)\r
100 +test_expect_equal "$output" "\\r
101 +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag5 unread)\r
102 +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag4 tag5 unread)"\r
103 +\r
104  test_expect_code 1 "Empty tag names" 'notmuch tag + One'\r
105  \r
106  test_expect_code 1 "Tag name beginning with -" 'notmuch tag +- One'\r
107 -- \r
108 1.7.10.4\r
109 \r