1 Return-Path: <pioto@pioto.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 4942D431FBC
\r
6 for <notmuch@notmuchmail.org>; Fri, 25 May 2012 06:44:19 -0700 (PDT)
\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 DqOD5vte6Pgs for <notmuch@notmuchmail.org>;
\r
16 Fri, 25 May 2012 06:44:18 -0700 (PDT)
\r
17 Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com
\r
18 [209.85.212.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 35978431FAF
\r
21 for <notmuch@notmuchmail.org>; Fri, 25 May 2012 06:44:18 -0700 (PDT)
\r
22 Received: by mail-vb0-f53.google.com with SMTP id fc26so989685vbb.26
\r
23 for <notmuch@notmuchmail.org>; Fri, 25 May 2012 06:44:18 -0700 (PDT)
\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
25 d=google.com; s=20120113;
\r
26 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
\r
27 :x-gm-message-state;
\r
28 bh=v6ZvlLsSyWlllxd7IlGktd5rlwFC5HF8OVuM+a9ROJ8=;
\r
29 b=NvFHh2LwFayYspxgezHq+67Foa1MIMrtIGy/gqFDL/4BpCPLf7foLXSYq6Lz/F1/Kp
\r
30 jGmG1cxssBuzBGlwK1ewwYnkrRHTgHRnNbgatQXGqw/DGb7j5GnULChhXn6jwRQC+Mb8
\r
31 Zy2ibEcaX4Ha4JzvgiOJhyAwSfP9Ew0iol4fxDwiyrnzWMsFy4WG6E1irAtYWg3bnbS6
\r
32 GNEAI8+WlrRTqEBl/ZxEEQvDiB4T9g3tGzvX5HWsuCoWUxeSmtj6DTliE4YHz78iPi6O
\r
33 qL7N1nvZr4jcOmE54Tg5OcnH4fRl5+HO9W93gWzpE9FDaT1w6NLUe2/DUZ1LJH+ChPGb
\r
35 Received: by 10.52.24.179 with SMTP id v19mr3111228vdf.127.1337953458008;
\r
36 Fri, 25 May 2012 06:44:18 -0700 (PDT)
\r
37 Received: from nas.home.pioto.org (pool-71-182-155-97.pitbpa.fios.verizon.net.
\r
39 by mx.google.com with ESMTPS id by2sm4223643vdb.22.2012.05.25.06.44.17
\r
40 (version=TLSv1/SSLv3 cipher=OTHER);
\r
41 Fri, 25 May 2012 06:44:17 -0700 (PDT)
\r
42 Received: by nas.home.pioto.org (Postfix, from userid 1001)
\r
43 id CB2B6287D2; Fri, 25 May 2012 09:44:16 -0400 (EDT)
\r
44 From: Mike Kelly <pioto@pioto.org>
\r
45 To: notmuch@notmuchmail.org
\r
46 Subject: [PATCH 10/10] tests: bsd sed doesn't allow replacing '\n'
\r
47 Date: Fri, 25 May 2012 09:43:31 -0400
\r
48 Message-Id: <1337953411-21000-11-git-send-email-pioto@pioto.org>
\r
49 X-Mailer: git-send-email 1.7.10.2
\r
50 In-Reply-To: <1337953411-21000-1-git-send-email-pioto@pioto.org>
\r
51 References: <1337953411-21000-1-git-send-email-pioto@pioto.org>
\r
53 ALoCoQlOjw3LAPwNN/rPzY16hBMTw+2UWq2Y0NzmQsMvUd4QZRIhf099vLqEkHfqBS8n+6K60fll
\r
54 X-BeenThere: notmuch@notmuchmail.org
\r
55 X-Mailman-Version: 2.1.13
\r
57 List-Id: "Use and development of the notmuch mail system."
\r
58 <notmuch.notmuchmail.org>
\r
59 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
61 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
62 List-Post: <mailto:notmuch@notmuchmail.org>
\r
63 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
64 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
66 X-List-Received-Date: Fri, 25 May 2012 13:44:19 -0000
\r
68 Various workarounds still don't act quite the same way. So, just use
\r
69 perl, which seems to act the way these tests expect.
\r
71 test/maildir-sync | 2 +-
\r
72 test/multipart | 22 +++++++++++-----------
\r
73 test/test-lib.sh | 2 +-
\r
74 3 files changed, 13 insertions(+), 13 deletions(-)
\r
76 diff --git a/test/maildir-sync b/test/maildir-sync
\r
77 index d72ec07..311ea44 100755
\r
78 --- a/test/maildir-sync
\r
79 +++ b/test/maildir-sync
\r
80 @@ -8,7 +8,7 @@ test_description="maildir synchronization"
\r
81 # --format=json" output includes some newlines. Also, need to avoid
\r
82 # including the local value of MAIL_DIR in the result.
\r
83 filter_show_json() {
\r
84 - sed -e 's/, /,\n/g' | sed -e "s|${MAIL_DIR}/|MAIL_DIR/|"
\r
85 + perl -npe 's/, /,\n/g' | sed -e "s|${MAIL_DIR}/|MAIL_DIR/|"
\r
89 diff --git a/test/multipart b/test/multipart
\r
90 index 72d3927..c868b7b 100755
\r
91 --- a/test/multipart
\r
92 +++ b/test/multipart
\r
93 @@ -319,7 +319,7 @@ test_expect_success \
\r
94 "notmuch show --format=text --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org'"
\r
96 test_begin_subtest "--format=json --part=0, full message"
\r
97 -notmuch show --format=json --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
\r
98 +notmuch show --format=json --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org' | perl -npe 's|{"id":|\n{"id":|g' >OUTPUT
\r
99 echo >>OUTPUT # expect *no* newline at end of output
\r
100 cat <<EOF >EXPECTED
\r
102 @@ -337,7 +337,7 @@ EOF
\r
103 test_expect_equal_file OUTPUT EXPECTED
\r
105 test_begin_subtest "--format=json --part=1, message body"
\r
106 -notmuch show --format=json --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
\r
107 +notmuch show --format=json --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org' | perl -npe 's|{"id":|\n{"id":|g' >OUTPUT
\r
108 echo >>OUTPUT # expect *no* newline at end of output
\r
109 cat <<EOF >EXPECTED
\r
111 @@ -354,7 +354,7 @@ EOF
\r
112 test_expect_equal_file OUTPUT EXPECTED
\r
114 test_begin_subtest "--format=json --part=2, multipart/mixed"
\r
115 -notmuch show --format=json --part=2 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
\r
116 +notmuch show --format=json --part=2 'id:87liy5ap00.fsf@yoom.home.cworth.org' | perl -npe 's|{"id":|\n{"id":|g' >OUTPUT
\r
117 echo >>OUTPUT # expect *no* newline at end of output
\r
118 cat <<EOF >EXPECTED
\r
120 @@ -369,7 +369,7 @@ EOF
\r
121 test_expect_equal_file OUTPUT EXPECTED
\r
123 test_begin_subtest "--format=json --part=3, rfc822 part"
\r
124 -notmuch show --format=json --part=3 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
\r
125 +notmuch show --format=json --part=3 'id:87liy5ap00.fsf@yoom.home.cworth.org' | perl -npe 's|{"id":|\n{"id":|g' >OUTPUT
\r
126 echo >>OUTPUT # expect *no* newline at end of output
\r
127 cat <<EOF >EXPECTED
\r
129 @@ -381,7 +381,7 @@ EOF
\r
130 test_expect_equal_file OUTPUT EXPECTED
\r
132 test_begin_subtest "--format=json --part=4, rfc822's multipart/alternative"
\r
133 -notmuch show --format=json --part=4 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
\r
134 +notmuch show --format=json --part=4 'id:87liy5ap00.fsf@yoom.home.cworth.org' | perl -npe 's|{"id":|\n{"id":|g' >OUTPUT
\r
135 echo >>OUTPUT # expect *no* newline at end of output
\r
136 cat <<EOF >EXPECTED
\r
138 @@ -392,7 +392,7 @@ EOF
\r
139 test_expect_equal_file OUTPUT EXPECTED
\r
141 test_begin_subtest "--format=json --part=5, rfc822's html part"
\r
142 -notmuch show --format=json --part=5 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
\r
143 +notmuch show --format=json --part=5 'id:87liy5ap00.fsf@yoom.home.cworth.org' | perl -npe 's|{"id":|\n{"id":|g' >OUTPUT
\r
144 echo >>OUTPUT # expect *no* newline at end of output
\r
145 cat <<EOF >EXPECTED
\r
147 @@ -401,7 +401,7 @@ EOF
\r
148 test_expect_equal_file OUTPUT EXPECTED
\r
150 test_begin_subtest "--format=json --part=6, rfc822's text part"
\r
151 -notmuch show --format=json --part=6 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
\r
152 +notmuch show --format=json --part=6 'id:87liy5ap00.fsf@yoom.home.cworth.org' | perl -npe 's|{"id":|\n{"id":|g' >OUTPUT
\r
153 echo >>OUTPUT # expect *no* newline at end of output
\r
154 cat <<EOF >EXPECTED
\r
156 @@ -410,7 +410,7 @@ EOF
\r
157 test_expect_equal_file OUTPUT EXPECTED
\r
159 test_begin_subtest "--format=json --part=7, inline attachment"
\r
160 -notmuch show --format=json --part=7 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
\r
161 +notmuch show --format=json --part=7 'id:87liy5ap00.fsf@yoom.home.cworth.org' | perl -npe 's|{"id":|\n{"id":|g' >OUTPUT
\r
162 echo >>OUTPUT # expect *no* newline at end of output
\r
163 cat <<EOF >EXPECTED
\r
165 @@ -419,7 +419,7 @@ EOF
\r
166 test_expect_equal_file OUTPUT EXPECTED
\r
168 test_begin_subtest "--format=json --part=8, plain text part"
\r
169 -notmuch show --format=json --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
\r
170 +notmuch show --format=json --part=8 'id:87liy5ap00.fsf@yoom.home.cworth.org' | perl -npe 's|{"id":|\n{"id":|g' >OUTPUT
\r
171 echo >>OUTPUT # expect *no* newline at end of output
\r
172 cat <<EOF >EXPECTED
\r
174 @@ -428,7 +428,7 @@ EOF
\r
175 test_expect_equal_file OUTPUT EXPECTED
\r
177 test_begin_subtest "--format=json --part=9, pgp signature (unverified)"
\r
178 -notmuch show --format=json --part=9 'id:87liy5ap00.fsf@yoom.home.cworth.org' | sed 's|{"id":|\n{"id":|g' >OUTPUT
\r
179 +notmuch show --format=json --part=9 'id:87liy5ap00.fsf@yoom.home.cworth.org' | perl -npe 's|{"id":|\n{"id":|g' >OUTPUT
\r
180 echo >>OUTPUT # expect *no* newline at end of output
\r
181 cat <<EOF >EXPECTED
\r
183 @@ -669,4 +669,4 @@ notmuch show --format=raw --part=3 id:base64-part-with-crlf > crlf.out
\r
184 echo -n -e "\xEF\x0D\x0A" > crlf.expected
\r
185 test_expect_equal_file crlf.out crlf.expected
\r
188 \ No newline at end of file
\r
190 diff --git a/test/test-lib.sh b/test/test-lib.sh
\r
191 index 06aaea2..4990ad6 100644
\r
192 --- a/test/test-lib.sh
\r
193 +++ b/test/test-lib.sh
\r
194 @@ -565,7 +565,7 @@ notmuch_show_sanitize_all ()
\r
196 notmuch_json_show_sanitize ()
\r
198 - sed -e 's|, |,\n |g' | \
\r
199 + perl -npe 's|, |,\n |g' | \
\r
201 -e 's|"id": "[^"]*",|"id": "XXXXX",|' \
\r
202 -e 's|"filename": "[^"]*",|"filename": "YYYYY",|'
\r