1 Return-Path: <amdragon@mit.edu>
\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 534B0431FAF
\r
6 for <notmuch@notmuchmail.org>; Mon, 26 Nov 2012 20:58:24 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 528Swl4YVmpA for <notmuch@notmuchmail.org>;
\r
16 Mon, 26 Nov 2012 20:58:22 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 5AC0A431FAE
\r
20 for <notmuch@notmuchmail.org>; Mon, 26 Nov 2012 20:58:22 -0800 (PST)
\r
21 X-AuditID: 12074422-b7f196d00000398d-88-50b4486d407c
\r
22 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])
\r
23 by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 6B.FA.14733.D6844B05; Mon, 26 Nov 2012 23:58:21 -0500 (EST)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id qAR4wK5X006906;
\r
27 Mon, 26 Nov 2012 23:58:20 -0500
\r
28 Received: from drake.dyndns.org
\r
29 (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com
\r
30 [209.6.116.242]) (authenticated bits=0)
\r
31 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
32 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qAR4wIlw024159
\r
33 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
34 Mon, 26 Nov 2012 23:58:20 -0500 (EST)
\r
35 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)
\r
36 (envelope-from <amdragon@mit.edu>)
\r
37 id 1TdDFS-0003m5-FT; Mon, 26 Nov 2012 23:58:18 -0500
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [PATCH] test: Quote $output in calls to test_expect_equal
\r
41 Date: Mon, 26 Nov 2012 23:58:17 -0500
\r
42 Message-Id: <1353992297-14473-1-git-send-email-amdragon@mit.edu>
\r
43 X-Mailer: git-send-email 1.7.10.4
\r
45 Content-Type: text/plain; charset=UTF-8
\r
46 Content-Transfer-Encoding: 8bit
\r
47 X-Brightmail-Tracker:
\r
48 H4sIAAAAAAAAA+NgFrrLIsWRmVeSWpSXmKPExsUixG6nopvrsSXA4MtDM4vrN2cyOzB6PFt1
\r
49 izmAMYrLJiU1J7MstUjfLoErY/uxQ2wFvyQrvu5SaGDcKtbFyMEhIWAisX+uXxcjJ5ApJnHh
\r
50 3nq2LkYuDiGBfYwSU57OZodwNjBKfHrUyQZSJSTwiEli94l0iMRcRoneM39YQBJsAhoS2/Yv
\r
51 ZwSxRQSkJXbenc0KsoFZQE3iT5cKSFhYIEPiwPedTCA2i4CqxK/W92wgJbwCDhIHfqhCHKEo
\r
52 0f1sAtgqXgFBiZMzn7BATFGXWD9PCCTMLCAv0bx1NvMERoFZSKpmIVTNQlK1gJF5FaNsSm6V
\r
53 bm5iZk5xarJucXJiXl5qka6pXm5miV5qSukmRnAouijtYPx5UOkQowAHoxIP74ElmwOEWBPL
\r
54 iitzDzFKcjApifIecd8SIMSXlJ9SmZFYnBFfVJqTWnyIUYKDWUmEd7EOUI43JbGyKrUoHyYl
\r
55 zcGiJM57LeWmv5BAemJJanZqakFqEUxWhoNDSYJ3KshQwaLU9NSKtMycEoQ0EwcnyHAeoOH5
\r
56 IDW8xQWJucWZ6RD5U4yKUuK8k9yAEgIgiYzSPLheWKp4xSgO9IowbzVIOw8wzcB1vwIazAQ0
\r
57 OPn6RpDBJYkIKakGxhXTHvAd/uJXJ82+dP9My1NNsx/PyXu0WlmwQWTGBR371VMSql+tvvKg
\r
58 Yb/Fxxfn2T69r5335IPrHLWzZhN+xiu6fZrKXZeXvP73adczD5jYl00p7CmKqHj5/vG6aV7x
\r
59 rL0p2ZtiV0+zm3ppA2tnxLf+wnizyavuXUtc/Ibp4zKpsAuT2K7kbLBSYinOSDTUYi4qTgQA
\r
61 X-BeenThere: notmuch@notmuchmail.org
\r
62 X-Mailman-Version: 2.1.13
\r
64 List-Id: "Use and development of the notmuch mail system."
\r
65 <notmuch.notmuchmail.org>
\r
66 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
67 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
68 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
69 List-Post: <mailto:notmuch@notmuchmail.org>
\r
70 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
71 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
72 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
73 X-List-Received-Date: Tue, 27 Nov 2012 04:58:24 -0000
\r
75 Previously, many tests in emacs-subject-to-filename didn't quote the
\r
76 $output argument to test_expect_equal. As a result, if $output was
\r
77 empty, test_expect_equal would be passed only one argument and would
\r
78 abort the entire test script. By quoting the argument, we ensure
\r
79 test_expect_equal will always receive two arguments.
\r
81 test/emacs-subject-to-filename | 18 +++++++++---------
\r
82 1 file changed, 9 insertions(+), 9 deletions(-)
\r
84 diff --git a/test/emacs-subject-to-filename b/test/emacs-subject-to-filename
\r
85 index a0ffdfe..1e94a98 100755
\r
86 --- a/test/emacs-subject-to-filename
\r
87 +++ b/test/emacs-subject-to-filename
\r
88 @@ -60,55 +60,55 @@ test_begin_subtest "filename #1"
\r
89 output=$(test_emacs '(notmuch-wash-subject-to-filename
\r
90 "just a subject line")'
\r
92 -test_expect_equal $output '"just-a-subject-line"'
\r
93 +test_expect_equal "$output" '"just-a-subject-line"'
\r
95 test_begin_subtest "filename #2"
\r
96 output=$(test_emacs '(notmuch-wash-subject-to-filename
\r
97 " [any] [prefixes are ] [removed!] from the subject")'
\r
99 -test_expect_equal $output '"from-the-subject"'
\r
100 +test_expect_equal "$output" '"from-the-subject"'
\r
102 test_begin_subtest "filename #3"
\r
103 output=$(test_emacs '(notmuch-wash-subject-to-filename
\r
104 " leading and trailing space ")'
\r
106 -test_expect_equal $output '"leading-and-trailing-space"'
\r
107 +test_expect_equal "$output" '"leading-and-trailing-space"'
\r
109 test_begin_subtest "filename #4"
\r
110 output=$(test_emacs '(notmuch-wash-subject-to-filename
\r
111 "!# leading ()// &%, and in between_and_trailing garbage ()(&%%")'
\r
113 -test_expect_equal $output '"-leading-and-in-between_and_trailing-garbage"'
\r
114 +test_expect_equal "$output" '"-leading-and-in-between_and_trailing-garbage"'
\r
116 test_begin_subtest "filename #5"
\r
117 output=$(test_emacs '(notmuch-wash-subject-to-filename
\r
118 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_01234567890")'
\r
120 -test_expect_equal $output '"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_01234567890"'
\r
121 +test_expect_equal "$output" '"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_01234567890"'
\r
123 test_begin_subtest "filename #6"
\r
124 output=$(test_emacs '(notmuch-wash-subject-to-filename
\r
125 "sequences of ... are squashed and trailing are removed ...")'
\r
127 -test_expect_equal $output '"sequences-of-.-are-squashed-and-trailing-are-removed"'
\r
128 +test_expect_equal "$output" '"sequences-of-.-are-squashed-and-trailing-are-removed"'
\r
130 test_begin_subtest "filename #7"
\r
131 output=$(test_emacs '(notmuch-wash-subject-to-filename
\r
132 "max length test" 1)'
\r
134 -test_expect_equal $output '"m"'
\r
135 +test_expect_equal "$output" '"m"'
\r
137 test_begin_subtest "filename #8"
\r
138 output=$(test_emacs '(notmuch-wash-subject-to-filename
\r
139 "max length test /&(/%&/%%&¤%¤" 20)'
\r
141 -test_expect_equal $output '"max-length-test"'
\r
142 +test_expect_equal "$output" '"max-length-test"'
\r
144 test_begin_subtest "filename #9"
\r
145 output=$(test_emacs '(notmuch-wash-subject-to-filename
\r
146 "[a prefix] [is only separated] by [spaces], so \"by\" is not okay!")'
\r
148 -test_expect_equal $output '"by-spaces-so-by-is-not-okay"'
\r
149 +test_expect_equal "$output" '"by-spaces-so-by-is-not-okay"'
\r
151 # test notmuch-wash-subject-to-patch-filename (subject)
\r
152 test_begin_subtest "patch filename #1"
\r