Re: Hi all
[notmuch-archives.git] / 1f / cf6f54e07c1b6addeb53339135c55350ffd27f
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 E2DFB431FCF\r
6         for <notmuch@notmuchmail.org>; Wed, 30 May 2012 00:03:07 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \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 VzevArM+Df6n for <notmuch@notmuchmail.org>;\r
16         Wed, 30 May 2012 00:03:04 -0700 (PDT)\r
17 Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com\r
18         [209.85.220.181]) (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 6C139431FCB\r
21         for <notmuch@notmuchmail.org>; Wed, 30 May 2012 00:02:57 -0700 (PDT)\r
22 Received: by mail-vc0-f181.google.com with SMTP id f1so4187995vcb.26\r
23         for <notmuch@notmuchmail.org>; Wed, 30 May 2012 00:02:57 -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=NHC8TOvs5HJfu9pgGwx9/V3WZRIC2meydESzQrCGaXU=;\r
29         b=Jh/8mhrAxzO+FetvgHd9iW/vdHAg8V7eQxyvNS2vcdP7NjgGigLEO0V2vsxibammg8\r
30         M1pwlY9euPeSDE9LXkXFpsmcxiYmEHU9mJnVBPaktJYSvjb0/aaAQ2euZ0ch9CZ0jGo5\r
31         PBN5wW/dKSQ0iL8XiHjA0jTHBC9A8rvkawzgcUOaDomIFziGTZTZhGF8YpoH3oWMzS9I\r
32         mUcJTihHH1/svcfHCJYrMpFgQQ00f95jDL5qIVYeI26vtRDNnGQ6TevF0HAis6xiR1me\r
33         64TvQD6fzD63SP9m4o6CnqrC8wrg6Lr4bpBsHgqTZ0KdVLbZlxfl2q4cF2fopa5UY0S4\r
34         mVng==\r
35 Received: by 10.52.31.137 with SMTP id a9mr13267069vdi.51.1338361377066;\r
36         Wed, 30 May 2012 00:02:57 -0700 (PDT)\r
37 Received: from nas.home.pioto.org (pool-71-182-155-97.pitbpa.fios.verizon.net.\r
38         [71.182.155.97])\r
39         by mx.google.com with ESMTPS id j2sm28312621vde.16.2012.05.30.00.02.56\r
40         (version=TLSv1/SSLv3 cipher=OTHER);\r
41         Wed, 30 May 2012 00:02:56 -0700 (PDT)\r
42 Received: by nas.home.pioto.org (Postfix, from userid 1001)\r
43         id 630F0287D6; Wed, 30 May 2012 03:02:55 -0400 (EDT)\r
44 From: Mike Kelly <pioto@pioto.org>\r
45 To: notmuch@notmuchmail.org\r
46 Subject: [PATCH v2 9/9] tests: bsd sed doesn't allow replacing '\n'\r
47 Date: Wed, 30 May 2012 03:02:04 -0400\r
48 Message-Id: <1338361324-57289-10-git-send-email-pioto@pioto.org>\r
49 X-Mailer: git-send-email 1.7.10.2\r
50 In-Reply-To: <1338361324-57289-1-git-send-email-pioto@pioto.org>\r
51 References: <1338361324-57289-1-git-send-email-pioto@pioto.org>\r
52 X-Gm-Message-State:\r
53  ALoCoQnkjNR+TE+Ms2w8by1XHb+JU20pcASZD/bvdNEK58M8ifG7yr0pLi5tv1mV0bQAGPY5lQtJ\r
54 X-BeenThere: notmuch@notmuchmail.org\r
55 X-Mailman-Version: 2.1.13\r
56 Precedence: list\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: Wed, 30 May 2012 07:03:08 -0000\r
67 \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
70 ---\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
75 \r
76 diff --git a/test/maildir-sync b/test/maildir-sync\r
77 index d72ec07..313238b 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 -pe 's/, /,\n/g' | sed -e "s|${MAIL_DIR}/|MAIL_DIR/|"\r
86      echo\r
87  }\r
88  \r
89 diff --git a/test/multipart b/test/multipart\r
90 index 72d3927..b15eea0 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
95  \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 -pe 's|{"id":|\n{"id":|g' >OUTPUT\r
99  echo >>OUTPUT # expect *no* newline at end of output\r
100  cat <<EOF >EXPECTED\r
101  \r
102 @@ -337,7 +337,7 @@ EOF\r
103  test_expect_equal_file OUTPUT EXPECTED\r
104  \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 -pe 's|{"id":|\n{"id":|g' >OUTPUT\r
108  echo >>OUTPUT # expect *no* newline at end of output\r
109  cat <<EOF >EXPECTED\r
110  \r
111 @@ -354,7 +354,7 @@ EOF\r
112  test_expect_equal_file OUTPUT EXPECTED\r
113  \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 -pe 's|{"id":|\n{"id":|g' >OUTPUT\r
117  echo >>OUTPUT # expect *no* newline at end of output\r
118  cat <<EOF >EXPECTED\r
119  \r
120 @@ -369,7 +369,7 @@ EOF\r
121  test_expect_equal_file OUTPUT EXPECTED\r
122  \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 -pe 's|{"id":|\n{"id":|g' >OUTPUT\r
126  echo >>OUTPUT # expect *no* newline at end of output\r
127  cat <<EOF >EXPECTED\r
128  \r
129 @@ -381,7 +381,7 @@ EOF\r
130  test_expect_equal_file OUTPUT EXPECTED\r
131  \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 -pe 's|{"id":|\n{"id":|g' >OUTPUT\r
135  echo >>OUTPUT # expect *no* newline at end of output\r
136  cat <<EOF >EXPECTED\r
137  \r
138 @@ -392,7 +392,7 @@ EOF\r
139  test_expect_equal_file OUTPUT EXPECTED\r
140  \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 -pe 's|{"id":|\n{"id":|g' >OUTPUT\r
144  echo >>OUTPUT # expect *no* newline at end of output\r
145  cat <<EOF >EXPECTED\r
146  \r
147 @@ -401,7 +401,7 @@ EOF\r
148  test_expect_equal_file OUTPUT EXPECTED\r
149  \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 -pe 's|{"id":|\n{"id":|g' >OUTPUT\r
153  echo >>OUTPUT # expect *no* newline at end of output\r
154  cat <<EOF >EXPECTED\r
155  \r
156 @@ -410,7 +410,7 @@ EOF\r
157  test_expect_equal_file OUTPUT EXPECTED\r
158  \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 -pe 's|{"id":|\n{"id":|g' >OUTPUT\r
162  echo >>OUTPUT # expect *no* newline at end of output\r
163  cat <<EOF >EXPECTED\r
164  \r
165 @@ -419,7 +419,7 @@ EOF\r
166  test_expect_equal_file OUTPUT EXPECTED\r
167  \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 -pe 's|{"id":|\n{"id":|g' >OUTPUT\r
171  echo >>OUTPUT # expect *no* newline at end of output\r
172  cat <<EOF >EXPECTED\r
173  \r
174 @@ -428,7 +428,7 @@ EOF\r
175  test_expect_equal_file OUTPUT EXPECTED\r
176  \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 -pe 's|{"id":|\n{"id":|g' >OUTPUT\r
180  echo >>OUTPUT # expect *no* newline at end of output\r
181  cat <<EOF >EXPECTED\r
182  \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
186  \r
187 -test_done\r
188 \ No newline at end of file\r
189 +test_done\r
190 diff --git a/test/test-lib.sh b/test/test-lib.sh\r
191 index 2ac92f7..7a3602e 100644\r
192 --- a/test/test-lib.sh\r
193 +++ b/test/test-lib.sh\r
194 @@ -587,7 +587,7 @@ notmuch_show_sanitize_all ()\r
195  \r
196  notmuch_json_show_sanitize ()\r
197  {\r
198 -    sed -e 's|, |,\n |g' | \\r
199 +    perl -pe 's|, |,\n |g' | \\r
200         sed \\r
201         -e 's|"id": "[^"]*",|"id": "XXXXX",|' \\r
202         -e 's|"filename": "[^"]*",|"filename": "YYYYY",|'\r
203 -- \r
204 1.7.10.2\r
205 \r