[PATCH] lib: reword comment about XFOLDER: prefix
[notmuch-archives.git] / 59 / 98d35ae1942f216a5597afb7ce4d86028e97d8
1 Return-Path: <tomi.ollila@iki.fi>\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 78CA2431FAF\r
6         for <notmuch@notmuchmail.org>; Tue, 27 Nov 2012 02:04:24 -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 PcdLMyzXn93I for <notmuch@notmuchmail.org>;\r
16         Tue, 27 Nov 2012 02:04:23 -0800 (PST)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 39538431FAE\r
19         for <notmuch@notmuchmail.org>; Tue, 27 Nov 2012 02:04:23 -0800 (PST)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id 8DC8F1000E5;\r
22         Tue, 27 Nov 2012 12:04:19 +0200 (EET)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org\r
25 Subject: Re: [PATCH] test: Quote $output in calls to test_expect_equal\r
26 In-Reply-To: <1353992297-14473-1-git-send-email-amdragon@mit.edu>\r
27 References: <1353992297-14473-1-git-send-email-amdragon@mit.edu>\r
28 User-Agent: Notmuch/0.14+84~g8a199bf (http://notmuchmail.org) Emacs/24.2.1\r
29         (x86_64-unknown-linux-gnu)\r
30 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
31         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
32         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
33 Date: Tue, 27 Nov 2012 12:04:18 +0200\r
34 Message-ID: <m27gp7nyzh.fsf@guru.guru-group.fi>\r
35 MIME-Version: 1.0\r
36 Content-Type: text/plain; charset=utf-8\r
37 Content-Transfer-Encoding: quoted-printable\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Tue, 27 Nov 2012 10:04:24 -0000\r
51 \r
52 On Tue, Nov 27 2012, Austin Clements <amdragon@MIT.EDU> wrote:\r
53 \r
54 > Previously, many tests in emacs-subject-to-filename didn't quote the\r
55 > $output argument to test_expect_equal.  As a result, if $output was\r
56 > empty, test_expect_equal would be passed only one argument and would\r
57 > abort the entire test script.  By quoting the argument, we ensure\r
58 > test_expect_equal will always receive two arguments.\r
59 > ---\r
60 \r
61 Looks SO good to me. +1 !\r
62 \r
63 Tomi\r
64 \r
65 PS: we should do something to detect aborting scripts\r
66     some options: 1) trap, 2) detect test_done not run, 3) return value\r
67             4) at the beginning of script state count of expexted tests\r
68 \r
69 >  test/emacs-subject-to-filename |   18 +++++++++---------\r
70 >  1 file changed, 9 insertions(+), 9 deletions(-)\r
71 >\r
72 > diff --git a/test/emacs-subject-to-filename b/test/emacs-subject-to-filen=\r
73 ame\r
74 > index a0ffdfe..1e94a98 100755\r
75 > --- a/test/emacs-subject-to-filename\r
76 > +++ b/test/emacs-subject-to-filename\r
77 > @@ -60,55 +60,55 @@ test_begin_subtest "filename #1"\r
78 >  output=3D$(test_emacs '(notmuch-wash-subject-to-filename\r
79 >        "just a subject line")'\r
80 >  )\r
81 > -test_expect_equal $output '"just-a-subject-line"'\r
82 > +test_expect_equal "$output" '"just-a-subject-line"'\r
83 >=20=20\r
84 >  test_begin_subtest "filename #2"\r
85 >  output=3D$(test_emacs '(notmuch-wash-subject-to-filename\r
86 >        " [any]  [prefixes are ] [removed!] from the subject")'\r
87 >  )\r
88 > -test_expect_equal $output '"from-the-subject"'\r
89 > +test_expect_equal "$output" '"from-the-subject"'\r
90 >=20=20\r
91 >  test_begin_subtest "filename #3"\r
92 >  output=3D$(test_emacs '(notmuch-wash-subject-to-filename\r
93 >        "  leading and trailing space  ")'\r
94 >  )\r
95 > -test_expect_equal $output '"leading-and-trailing-space"'\r
96 > +test_expect_equal "$output" '"leading-and-trailing-space"'\r
97 >=20=20\r
98 >  test_begin_subtest "filename #4"\r
99 >  output=3D$(test_emacs '(notmuch-wash-subject-to-filename\r
100 >        "!#  leading ()// &%, and in between_and_trailing garbage ()(&%%")'\r
101 >  )\r
102 > -test_expect_equal $output '"-leading-and-in-between_and_trailing-garbage=\r
103 "'\r
104 > +test_expect_equal "$output" '"-leading-and-in-between_and_trailing-garba=\r
105 ge"'\r
106 >=20=20\r
107 >  test_begin_subtest "filename #5"\r
108 >  output=3D$(test_emacs '(notmuch-wash-subject-to-filename\r
109 >        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_0123456789=\r
110 0")'\r
111 >  )\r
112 > -test_expect_equal $output '"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqr=\r
113 stuvwxyz.-_01234567890"'\r
114 > +test_expect_equal "$output" '"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnop=\r
115 qrstuvwxyz.-_01234567890"'\r
116 >=20=20\r
117 >  test_begin_subtest "filename #6"\r
118 >  output=3D$(test_emacs '(notmuch-wash-subject-to-filename\r
119 >        "sequences of ... are squashed and trailing are removed ...")'\r
120 >  )\r
121 > -test_expect_equal $output '"sequences-of-.-are-squashed-and-trailing-are=\r
122 -removed"'\r
123 > +test_expect_equal "$output" '"sequences-of-.-are-squashed-and-trailing-a=\r
124 re-removed"'\r
125 >=20=20\r
126 >  test_begin_subtest "filename #7"\r
127 >  output=3D$(test_emacs '(notmuch-wash-subject-to-filename\r
128 >        "max length test" 1)'\r
129 >  )\r
130 > -test_expect_equal $output '"m"'\r
131 > +test_expect_equal "$output" '"m"'\r
132 >=20=20\r
133 >  test_begin_subtest "filename #8"\r
134 >  output=3D$(test_emacs '(notmuch-wash-subject-to-filename\r
135 >        "max length test /&(/%&/%%&=C2=A4%=C2=A4" 20)'\r
136 >  )\r
137 > -test_expect_equal $output '"max-length-test"'\r
138 > +test_expect_equal "$output" '"max-length-test"'\r
139 >=20=20\r
140 >  test_begin_subtest "filename #9"\r
141 >  output=3D$(test_emacs '(notmuch-wash-subject-to-filename\r
142 >        "[a prefix] [is only separated] by [spaces], so \"by\" is not okay=\r
143 !")'\r
144 >  )\r
145 > -test_expect_equal $output '"by-spaces-so-by-is-not-okay"'\r
146 > +test_expect_equal "$output" '"by-spaces-so-by-is-not-okay"'\r
147 >=20=20\r
148 >  # test notmuch-wash-subject-to-patch-filename (subject)\r
149 >  test_begin_subtest "patch filename #1"\r
150 > --=20\r
151 > 1.7.10.4\r
152 >\r
153 > _______________________________________________\r
154 > notmuch mailing list\r
155 > notmuch@notmuchmail.org\r
156 > http://notmuchmail.org/mailman/listinfo/notmuch\r