[PATCH] configure: add --without-api-docs option
[notmuch-archives.git] / 0b / c91a57088ec9a5374f3b9e2f5a71ca93533040
1 Return-Path: <jani@nikula.org>\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 D083C429E29\r
6         for <notmuch@notmuchmail.org>; Sun, 25 Dec 2011 14:00:23 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
9 X-Spam-Flag: NO\r
10 X-Spam-Score: -0.7\r
11 X-Spam-Level: \r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
13         tests=[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 BRZThzZLFVfj for <notmuch@notmuchmail.org>;\r
17         Sun, 25 Dec 2011 14:00:21 -0800 (PST)\r
18 Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com\r
19  [74.125.83.53])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
20  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
21  F2730429E2F    for <notmuch@notmuchmail.org>; Sun, 25 Dec 2011 14:00:18 -0800\r
22  (PST)\r
23 Received: by mail-ee0-f53.google.com with SMTP id d41so12900601eek.26\r
24         for <notmuch@notmuchmail.org>; Sun, 25 Dec 2011 14:00:18 -0800 (PST)\r
25 Received: by 10.213.31.207 with SMTP id z15mr41279ebc.144.1324850418496;\r
26         Sun, 25 Dec 2011 14:00:18 -0800 (PST)\r
27 Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi.\r
28         [80.220.92.23])\r
29         by mx.google.com with ESMTPS id b49sm51870237eec.9.2011.12.25.14.00.16\r
30         (version=SSLv3 cipher=OTHER); Sun, 25 Dec 2011 14:00:17 -0800 (PST)\r
31 From: Jani Nikula <jani@nikula.org>\r
32 To: notmuch@notmuchmail.org\r
33 Subject: [PATCH v2 2/2] test: emacs: test notmuch-wash-subject-to-* functions\r
34 Date: Mon, 26 Dec 2011 00:00:06 +0200\r
35 Message-Id:\r
36  <311bcf81efbda645f3b436dd14300ccf5d53f1ff.1324849534.git.jani@nikula.org>\r
37 X-Mailer: git-send-email 1.7.5.4\r
38 In-Reply-To: <cover.1324849534.git.jani@nikula.org>\r
39 References: <1321657368-13872-1-git-send-email-jani@nikula.org>\r
40         <cover.1324849534.git.jani@nikula.org>\r
41 In-Reply-To: <cover.1324849534.git.jani@nikula.org>\r
42 References: <cover.1324849534.git.jani@nikula.org>\r
43 MIME-Version: 1.0\r
44 Content-Type: text/plain; charset=UTF-8\r
45 Content-Transfer-Encoding: 8bit\r
46 X-BeenThere: notmuch@notmuchmail.org\r
47 X-Mailman-Version: 2.1.13\r
48 Precedence: list\r
49 List-Id: "Use and development of the notmuch mail system."\r
50         <notmuch.notmuchmail.org>\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
54 List-Post: <mailto:notmuch@notmuchmail.org>\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
58 X-List-Received-Date: Sun, 25 Dec 2011 22:00:24 -0000\r
59 \r
60 Signed-off-by: Jani Nikula <jani@nikula.org>\r
61 ---\r
62  test/emacs-subject-to-filename |  138 ++++++++++++++++++++++++++++++++++++++++\r
63  test/notmuch-test              |    1 +\r
64  2 files changed, 139 insertions(+), 0 deletions(-)\r
65  create mode 100755 test/emacs-subject-to-filename\r
66 \r
67 diff --git a/test/emacs-subject-to-filename b/test/emacs-subject-to-filename\r
68 new file mode 100755\r
69 index 0000000..176e685\r
70 --- /dev/null\r
71 +++ b/test/emacs-subject-to-filename\r
72 @@ -0,0 +1,138 @@\r
73 +#!/usr/bin/env bash\r
74 +\r
75 +test_description="emacs: mail subject to filename"\r
76 +. test-lib.sh\r
77 +\r
78 +# emacs server can't be started in a child process with $(test_emacs ...)\r
79 +test_emacs '(ignore)'\r
80 +\r
81 +# test notmuch-wash-subject-to-patch-sequence-number (subject)\r
82 +test_begin_subtest "no patch sequence number"\r
83 +output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number\r
84 +      "[PATCH] A normal patch subject without numbers")'\r
85 +)\r
86 +test_expect_equal "$output" ""\r
87 +\r
88 +test_begin_subtest "patch sequence number #1"\r
89 +output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number\r
90 +      "[PATCH 2/3] A most regular patch subject")'\r
91 +)\r
92 +test_expect_equal "$output" 2\r
93 +\r
94 +test_begin_subtest "patch sequence number #2"\r
95 +output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number\r
96 +      "  [dummy list prefix]  [RFC PATCH v2 13/42]  Special prefixes")'\r
97 +)\r
98 +test_expect_equal "$output" 13\r
99 +\r
100 +test_begin_subtest "patch sequence number #3"\r
101 +output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number\r
102 +      "[PATCH 2/3] [PATCH 032/037] use the last prefix")'\r
103 +)\r
104 +test_expect_equal "$output" 32\r
105 +\r
106 +test_begin_subtest "patch sequence number #4"\r
107 +output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number\r
108 +      "[dummy list prefix] [PATCH 2/3] PATCH 3/3] do not use a broken prefix")'\r
109 +)\r
110 +test_expect_equal "$output" 2\r
111 +\r
112 +test_begin_subtest "patch sequence number #5"\r
113 +output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number\r
114 +      "[RFC][PATCH 3/5][PATCH 4/5][PATCH 5/5] A made up test")'\r
115 +)\r
116 +test_expect_equal "$output" 5\r
117 +\r
118 +test_begin_subtest "patch sequence number #6"\r
119 +output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number\r
120 +      "[PATCH 2/3] this -> [PATCH 3/3] is not a prefix anymore [nor this 4/4]")'\r
121 +)\r
122 +test_expect_equal "$output" 2\r
123 +\r
124 +test_begin_subtest "patch sequence number #7"\r
125 +output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number\r
126 +      "[liberally accept crapola right before123/456and after] the numbers")'\r
127 +)\r
128 +test_expect_equal "$output" 123\r
129 +\r
130 +# test notmuch-wash-subject-to-filename (subject &optional maxlen)\r
131 +test_begin_subtest "filename #1"\r
132 +output=$(test_emacs '(notmuch-wash-subject-to-filename\r
133 +      "just a subject line")'\r
134 +)\r
135 +test_expect_equal $output '"just-a-subject-line"'\r
136 +\r
137 +test_begin_subtest "filename #2"\r
138 +output=$(test_emacs '(notmuch-wash-subject-to-filename\r
139 +      " [any]  [prefixes are ] [removed!] from the subject")'\r
140 +)\r
141 +test_expect_equal $output '"from-the-subject"'\r
142 +\r
143 +test_begin_subtest "filename #3"\r
144 +output=$(test_emacs '(notmuch-wash-subject-to-filename\r
145 +      "  leading and trailing space  ")'\r
146 +)\r
147 +test_expect_equal $output '"leading-and-trailing-space"'\r
148 +\r
149 +test_begin_subtest "filename #4"\r
150 +output=$(test_emacs '(notmuch-wash-subject-to-filename\r
151 +      "!#  leading ()// &%, and in between_and_trailing garbage ()(&%%")'\r
152 +)\r
153 +test_expect_equal $output '"-leading-and-in-between_and_trailing-garbage"'\r
154 +\r
155 +test_begin_subtest "filename #5"\r
156 +output=$(test_emacs '(notmuch-wash-subject-to-filename\r
157 +      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_01234567890")'\r
158 +)\r
159 +test_expect_equal $output '"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_01234567890"'\r
160 +\r
161 +test_begin_subtest "filename #6"\r
162 +output=$(test_emacs '(notmuch-wash-subject-to-filename\r
163 +      "sequences of ... are squashed and trailing are removed ...")'\r
164 +)\r
165 +test_expect_equal $output '"sequences-of-.-are-squashed-and-trailing-are-removed"'\r
166 +\r
167 +test_begin_subtest "filename #7"\r
168 +output=$(test_emacs '(notmuch-wash-subject-to-filename\r
169 +      "max length test" 1)'\r
170 +)\r
171 +test_expect_equal $output '"m"'\r
172 +\r
173 +test_begin_subtest "filename #8"\r
174 +output=$(test_emacs '(notmuch-wash-subject-to-filename\r
175 +      "max length test /&(/%&/%%&¤%¤" 20)'\r
176 +)\r
177 +test_expect_equal $output '"max-length-test"'\r
178 +\r
179 +test_begin_subtest "filename #9"\r
180 +output=$(test_emacs '(notmuch-wash-subject-to-filename\r
181 +      "[a prefix] [is only separated] by [spaces], so \"by\" is not okay!")'\r
182 +)\r
183 +test_expect_equal $output '"by-spaces-so-by-is-not-okay"'\r
184 +\r
185 +# test notmuch-wash-subject-to-patch-filename (subject)\r
186 +test_begin_subtest "patch filename #1"\r
187 +output=$(test_emacs '(notmuch-wash-subject-to-patch-filename\r
188 +      "[RFC][PATCH 099/100] rewrite notmuch")'\r
189 +)\r
190 +test_expect_equal "$output" '"0099-rewrite-notmuch.patch"'\r
191 +\r
192 +test_begin_subtest "patch filename #2"\r
193 +output=$(test_emacs '(notmuch-wash-subject-to-patch-filename\r
194 +      "[RFC PATCH v1] has no patch number, default to 1")'\r
195 +)\r
196 +test_expect_equal "$output" '"0001-has-no-patch-number-default-to-1.patch"'\r
197 +\r
198 +test_begin_subtest "patch filename #3"\r
199 +output=$(test_emacs '(notmuch-wash-subject-to-patch-filename\r
200 +      "[PATCH 4/5] the maximum length of a patch filename is 52 + patch sequence number + .patch extension")'\r
201 +)\r
202 +test_expect_equal "$output" '"0004-the-maximum-length-of-a-patch-filename-is-52-patch-s.patch"'\r
203 +\r
204 +test_begin_subtest "patch filename #4"\r
205 +output=$(test_emacs '(notmuch-wash-subject-to-patch-filename\r
206 +      "[PATCH 4/5] the maximum length of a patch filename is 52 + patchh ! sequence number + .patch extension, *before* trimming trailing - and .")'\r
207 +)\r
208 +test_expect_equal "$output" '"0004-the-maximum-length-of-a-patch-filename-is-52-patchh.patch"'\r
209 +\r
210 +test_done\r
211 diff --git a/test/notmuch-test b/test/notmuch-test\r
212 index ded79e8..e40ef86 100755\r
213 --- a/test/notmuch-test\r
214 +++ b/test/notmuch-test\r
215 @@ -42,6 +42,7 @@ TESTS="\r
216    encoding\r
217    emacs\r
218    emacs-large-search-buffer\r
219 +  emacs-subject-to-filename\r
220    maildir-sync\r
221    crypto\r
222    symbol-hiding\r
223 -- \r
224 1.7.5.4\r
225 \r