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 8AA1C431FAF
\r
6 for <notmuch@notmuchmail.org>; Sun, 16 Dec 2012 07:51:14 -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 5JofUNcTbHY6 for <notmuch@notmuchmail.org>;
\r
16 Sun, 16 Dec 2012 07:51:12 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 3E6FF431FAE
\r
20 for <notmuch@notmuchmail.org>; Sun, 16 Dec 2012 07:51:12 -0800 (PST)
\r
21 X-AuditID: 12074425-b7f606d0000008ea-a9-50cdedef0c3a
\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])
\r
23 by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 94.54.02282.FEDEDC05; Sun, 16 Dec 2012 10:51:11 -0500 (EST)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id qBGFpAnM028400;
\r
27 Sun, 16 Dec 2012 10:51:11 -0500
\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])
\r
29 (authenticated bits=0)
\r
30 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
31 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qBGFp8ER004550
\r
32 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);
\r
33 Sun, 16 Dec 2012 10:51:09 -0500 (EST)
\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)
\r
35 (envelope-from <amdragon@mit.edu>)
\r
36 id 1TkGUe-0000lQ-AP; Sun, 16 Dec 2012 10:51:08 -0500
\r
37 From: Austin Clements <amdragon@MIT.EDU>
\r
38 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org
\r
39 Subject: Re: [PATCH v2 3/4] test: notmuch search --format=text0
\r
41 <5c881edb2803e613e8726f71fe86772d372b38a0.1355064714.git.jani@nikula.org>
\r
42 References: <cover.1355064714.git.jani@nikula.org>
\r
43 <5c881edb2803e613e8726f71fe86772d372b38a0.1355064714.git.jani@nikula.org>
\r
44 User-Agent: Notmuch/0.14+184~gc26cc51 (http://notmuchmail.org) Emacs/23.4.1
\r
46 Date: Sun, 16 Dec 2012 10:51:08 -0500
\r
47 Message-ID: <87y5gyvvv7.fsf@awakening.csail.mit.edu>
\r
49 Content-Type: text/plain; charset=utf-8
\r
50 Content-Transfer-Encoding: quoted-printable
\r
51 X-Brightmail-Tracker:
\r
52 H4sIAAAAAAAAA+NgFmpileLIzCtJLcpLzFFi42IR4hTV1n3/9myAwbNtOhZN050trt+cyezA
\r
53 5HHr/mt2j2erbjEHMEVx2aSk5mSWpRbp2yVwZRzufctWcFO8ovvzBbYGxj6RLkYODgkBE4n2
\r
54 vQVdjJxAppjEhXvr2boYuTiEBPYxSiw4+YUNJCEksIFR4uZbJ4jERSaJa02dTBDOEkaJiTP+
\r
55 MINUsQloSGzbv5wRxBYRsJI49/A1C4gtLGAvsb59P9gkToEwiQctXxghptZIHJhxmRHkClGB
\r
56 eImzS01AwiwCqhLTPr4Ca+UFOu5w6xk2CFtQ4uTMJ2BxZgF1iT/zLjFD2NoSyxa+Zp7AKDgL
\r
57 SdksJGWzkJQtYGRexSibklulm5uYmVOcmqxbnJyYl5dapGuhl5tZopeaUrqJERS87C6qOxgn
\r
58 HFI6xCjAwajEw2vx9UyAEGtiWXFl7iFGSQ4mJVHeea/PBgjxJeWnVGYkFmfEF5XmpBYfYpTg
\r
59 YFYS4f17DyjHm5JYWZValA+TkuZgURLnvZFy019IID2xJDU7NbUgtQgmK8PBoSTBe/MNUKNg
\r
60 UWp6akVaZk4JQpqJgxNkOA/Q8LsgNbzFBYm5xZnpEPlTjLocv/7deMooxJKXn5cqJc57BqRI
\r
61 AKQoozQPbg4s6bxiFAd6S5j3KUgVDzBhwU16BbSECWjJcpszIEtKEhFSUg2MZrITd1ot2Mgf
\r
62 1xZ0oDl/N8eHs35Pm7/+fxlQJ6EUVvx/8W+Gjet/uigk/dn+MHP3g6yp+Xy3J0w98v9fy2Wj
\r
63 SOvKWvWvfAf9d7VP2+W9LEIkdLPfRG5hNut/F5Z1iVa9sZP/IOm0Q1Vmosc2xcvGlcpW7nsn
\r
64 ptx8FNa6ZybX6Quvv0mK/LKXUGIpzkg01GIuKk4EAA/RdyUVAwAA
\r
65 X-BeenThere: notmuch@notmuchmail.org
\r
66 X-Mailman-Version: 2.1.13
\r
68 List-Id: "Use and development of the notmuch mail system."
\r
69 <notmuch.notmuchmail.org>
\r
70 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
71 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
73 List-Post: <mailto:notmuch@notmuchmail.org>
\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
75 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
76 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
77 X-List-Received-Date: Sun, 16 Dec 2012 15:51:14 -0000
\r
79 On Sun, 09 Dec 2012, Jani Nikula <jani@nikula.org> wrote:
\r
81 > test/text | 29 +++++++++++++++++++++++++++++
\r
82 > 1 file changed, 29 insertions(+)
\r
84 > diff --git a/test/text b/test/text
\r
85 > index 428c89b..e003a66 100755
\r
88 > @@ -52,4 +52,33 @@ output=3D$(notmuch search --format=3Dtext "t=C3=ABxt-s=
\r
89 earch-m=C3=A9ssage" | notmuch_search_s
\r
90 > test_expect_equal "$output" \
\r
91 > "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; text-search-utf8-body=
\r
92 -s=C3=BCbj=C3=A9ct (inbox unread)"
\r
96 > +test_begin_subtest "Search message tags: text0"
\r
97 > +cat <<EOF > EXPECTED.$test_count
\r
99 Other tests use just OUTPUT and EXPECTED. Why the $test_count? Is
\r
100 there a technical reason for it?
\r
102 > +attachment inbox signed unread
\r
104 > +notmuch search --format=3Dtext0 --output=3Dtags '*' | xargs -0 | notmuch=
\r
105 _search_sanitize > OUTPUT.$test_count
\r
106 > +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count
\r
108 > +test_begin_subtest "Compare text vs. text0 for threads"
\r
109 > +notmuch search --format=3Dtext --output=3Dthreads '*' | notmuch_search_s=
\r
110 anitize > EXPECTED.$test_count
\r
111 > +notmuch search --format=3Dtext0 --output=3Dthreads '*' | xargs -0 -L1 | =
\r
112 notmuch_search_sanitize > OUTPUT.$test_count
\r
114 I think it would be worth "strengthening" these tests as Mark pointed
\r
115 out. It would be easy to accidentally include a literal \n in the
\r
116 output instead of calling the separator method, and this test wouldn't
\r
117 catch that. I think Mark's suggestion with tr is pretty good, since it
\r
118 directly disambiguates \0 and \n in the output, while producing a
\r
119 reasonable diff if things do go wrong.
\r
121 > +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count
\r
123 > +test_begin_subtest "Compare text vs. text0 for messages"
\r
124 > +notmuch search --format=3Dtext --output=3Dmessages '*' | notmuch_search_=
\r
125 sanitize > EXPECTED.$test_count
\r
126 > +notmuch search --format=3Dtext0 --output=3Dmessages '*' | xargs -0 -L1 |=
\r
127 notmuch_search_sanitize > OUTPUT.$test_count
\r
128 > +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count
\r
130 > +test_begin_subtest "Compare text vs. text0 for files"
\r
131 > +notmuch search --format=3Dtext --output=3Dfiles '*' | notmuch_search_san=
\r
132 itize > EXPECTED.$test_count
\r
133 > +notmuch search --format=3Dtext0 --output=3Dfiles '*' | xargs -0 -L1 | no=
\r
134 tmuch_search_sanitize > OUTPUT.$test_count
\r
135 > +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count
\r
137 > +test_begin_subtest "Compare text vs. text0 for tags"
\r
138 > +notmuch search --format=3Dtext --output=3Dtags '*' | notmuch_search_sani=
\r
139 tize > EXPECTED.$test_count
\r
140 > +notmuch search --format=3Dtext0 --output=3Dtags '*' | xargs -0 -L1 | not=
\r
141 much_search_sanitize > OUTPUT.$test_count
\r
142 > +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count
\r
148 > _______________________________________________
\r
149 > notmuch mailing list
\r
150 > notmuch@notmuchmail.org
\r
151 > http://notmuchmail.org/mailman/listinfo/notmuch
\r