[Patch v7 1/6] dump: support gzipped and atomic output
[notmuch-archives.git] / 77 / 2b25d4fcb8ca6db29a9bd15508b8fe90d7aa43
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 71132431FBF\r
6         for <notmuch@notmuchmail.org>; Sat,  8 Mar 2014 13:21:45 -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 3zh8oxbs3uaS for <notmuch@notmuchmail.org>;\r
16         Sat,  8 Mar 2014 13:21:41 -0800 (PST)\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
18         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 8F2FB429E27\r
21         for <notmuch@notmuchmail.org>; Sat,  8 Mar 2014 13:20:54 -0800 (PST)\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
23         (envelope-from <bremner@tethera.net>)\r
24         id 1WMOft-0005A0-UP; Sat, 08 Mar 2014 17:20:53 -0400\r
25 Received: (nullmailer pid 28542 invoked by uid 1000); Sat, 08 Mar 2014\r
26         21:20:03 -0000\r
27 From: David Bremner <david@tethera.net>\r
28 To: notmuch@notmuchmail.org\r
29 Subject: [Patch v3 08/15] test: add tests for the new boolean folder: and\r
30         path: prefixes\r
31 Date: Sat,  8 Mar 2014 17:19:38 -0400\r
32 Message-Id: <1394313585-28422-9-git-send-email-david@tethera.net>\r
33 X-Mailer: git-send-email 1.8.5.3\r
34 In-Reply-To: <1394313585-28422-1-git-send-email-david@tethera.net>\r
35 References: <1394313585-28422-1-git-send-email-david@tethera.net>\r
36 X-BeenThere: notmuch@notmuchmail.org\r
37 X-Mailman-Version: 2.1.13\r
38 Precedence: list\r
39 List-Id: "Use and development of the notmuch mail system."\r
40         <notmuch.notmuchmail.org>\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
42         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
44 List-Post: <mailto:notmuch@notmuchmail.org>\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
48 X-List-Received-Date: Sat, 08 Mar 2014 21:21:45 -0000\r
49 \r
50 From: Jani Nikula <jani@nikula.org>\r
51 \r
52 Additional tests for the boolean folder: and path: prefixes using the\r
53 new corpus.\r
54 ---\r
55  test/T101-search-by-folder-and-path.sh | 83 ++++++++++++++++++++++++++++++++++\r
56  1 file changed, 83 insertions(+)\r
57  create mode 100755 test/T101-search-by-folder-and-path.sh\r
58 \r
59 diff --git a/test/T101-search-by-folder-and-path.sh b/test/T101-search-by-folder-and-path.sh\r
60 new file mode 100755\r
61 index 0000000..9f809e4\r
62 --- /dev/null\r
63 +++ b/test/T101-search-by-folder-and-path.sh\r
64 @@ -0,0 +1,83 @@\r
65 +#!/usr/bin/env bash\r
66 +test_description='"notmuch search" by folder: and path:'\r
67 +. ./test-lib.sh\r
68 +\r
69 +add_email_corpus folders\r
70 +\r
71 +test_begin_subtest "folder: search"\r
72 +output=$(notmuch search --output=files folder:foo | sed -e "s,$MAIL_DIR,MAIL_DIR," | sort)\r
73 +# bar/baz/05:2, and new/03:2, are duplicates of foo/05:2, and\r
74 +# foo/new/03:2, respectively\r
75 +test_expect_equal "$output" "MAIL_DIR/bar/baz/05:2,\r
76 +MAIL_DIR/foo/05:2,\r
77 +MAIL_DIR/foo/06:2,\r
78 +MAIL_DIR/foo/cur/07:2,\r
79 +MAIL_DIR/foo/cur/08:2,\r
80 +MAIL_DIR/foo/new/03:2,\r
81 +MAIL_DIR/foo/new/09:2,\r
82 +MAIL_DIR/foo/new/10:2,\r
83 +MAIL_DIR/new/03:2,"\r
84 +\r
85 +test_begin_subtest "top level folder: search"\r
86 +output=$(notmuch search --output=files folder:'""' | sed -e "s,$MAIL_DIR,MAIL_DIR," | sort)\r
87 +# foo/new/03:2, is a duplicate of new/03:2,\r
88 +test_expect_equal "$output" "MAIL_DIR/01:2,\r
89 +MAIL_DIR/02:2,\r
90 +MAIL_DIR/cur/29:2,\r
91 +MAIL_DIR/cur/30:2,\r
92 +MAIL_DIR/cur/31:2,\r
93 +MAIL_DIR/cur/32:2,\r
94 +MAIL_DIR/cur/33:2,\r
95 +MAIL_DIR/cur/34:2,\r
96 +MAIL_DIR/cur/35:2,\r
97 +MAIL_DIR/cur/36:2,\r
98 +MAIL_DIR/cur/37:2,\r
99 +MAIL_DIR/cur/38:2,\r
100 +MAIL_DIR/cur/39:2,\r
101 +MAIL_DIR/cur/40:2,\r
102 +MAIL_DIR/cur/41:2,\r
103 +MAIL_DIR/cur/42:2,\r
104 +MAIL_DIR/cur/43:2,\r
105 +MAIL_DIR/cur/44:2,\r
106 +MAIL_DIR/cur/45:2,\r
107 +MAIL_DIR/cur/46:2,\r
108 +MAIL_DIR/cur/47:2,\r
109 +MAIL_DIR/cur/48:2,\r
110 +MAIL_DIR/cur/49:2,\r
111 +MAIL_DIR/cur/50:2,\r
112 +MAIL_DIR/cur/52:2,\r
113 +MAIL_DIR/cur/53:2,\r
114 +MAIL_DIR/foo/new/03:2,\r
115 +MAIL_DIR/new/03:2,\r
116 +MAIL_DIR/new/04:2,"\r
117 +\r
118 +test_begin_subtest "path: search"\r
119 +output=$(notmuch search --output=files path:"bar" | sed -e "s,$MAIL_DIR,MAIL_DIR," | sort)\r
120 +# foo/05:2, is a duplicate of bar/baz/05:2,\r
121 +test_expect_equal "$output" "MAIL_DIR/bar/17:2,\r
122 +MAIL_DIR/bar/18:2,"\r
123 +\r
124 +test_begin_subtest "top level path: search"\r
125 +output=$(notmuch search --output=files path:'""' | sed -e "s,$MAIL_DIR,MAIL_DIR," | sort)\r
126 +test_expect_equal "$output" "MAIL_DIR/01:2,\r
127 +MAIL_DIR/02:2,"\r
128 +\r
129 +test_begin_subtest "recursive path: search"\r
130 +output=$(notmuch search --output=files path:"bar/**" | sed -e "s,$MAIL_DIR,MAIL_DIR," | sort)\r
131 +# foo/05:2, is a duplicate of bar/baz/05:2,\r
132 +test_expect_equal "$output" "MAIL_DIR/bar/17:2,\r
133 +MAIL_DIR/bar/18:2,\r
134 +MAIL_DIR/bar/baz/05:2,\r
135 +MAIL_DIR/bar/baz/23:2,\r
136 +MAIL_DIR/bar/baz/24:2,\r
137 +MAIL_DIR/bar/baz/cur/25:2,\r
138 +MAIL_DIR/bar/baz/cur/26:2,\r
139 +MAIL_DIR/bar/baz/new/27:2,\r
140 +MAIL_DIR/bar/baz/new/28:2,\r
141 +MAIL_DIR/bar/cur/19:2,\r
142 +MAIL_DIR/bar/cur/20:2,\r
143 +MAIL_DIR/bar/new/21:2,\r
144 +MAIL_DIR/bar/new/22:2,\r
145 +MAIL_DIR/foo/05:2,"\r
146 +\r
147 +test_done\r
148 -- \r
149 1.8.5.3\r
150 \r