Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / d7 / 7c0c31ec90cb190c4055e7382204d32791ac3f
1 Return-Path: <m.walters@qmul.ac.uk>\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 E5956431FC0\r
6         for <notmuch@notmuchmail.org>; Sun, 16 Dec 2012 00:17:55 -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: -1.098\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
12         tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
13         NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id 3z31WxizrwEI for <notmuch@notmuchmail.org>;\r
17         Sun, 16 Dec 2012 00:17:55 -0800 (PST)\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 2ABB7431FB6\r
22         for <notmuch@notmuchmail.org>; Sun, 16 Dec 2012 00:17:55 -0800 (PST)\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
24         by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
25         (envelope-from <m.walters@qmul.ac.uk>)\r
26         id 1Tk9Q1-000093-9A; Sun, 16 Dec 2012 08:17:53 +0000\r
27 Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost)\r
28         by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
29         (envelope-from <m.walters@qmul.ac.uk>)\r
30         id 1Tk9Q0-0004nv-Us; Sun, 16 Dec 2012 08:17:53 +0000\r
31 From: Mark Walters <markwalters1009@gmail.com>\r
32 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
33 Subject: Re: [PATCH v2 3/4] test: notmuch search --format=text0\r
34 In-Reply-To:\r
35  <5c881edb2803e613e8726f71fe86772d372b38a0.1355064714.git.jani@nikula.org>\r
36 References: <cover.1355064714.git.jani@nikula.org>\r
37         <5c881edb2803e613e8726f71fe86772d372b38a0.1355064714.git.jani@nikula.org>\r
38 User-Agent: Notmuch/0.14+155~g7edfdc3 (http://notmuchmail.org) Emacs/23.4.1\r
39         (x86_64-pc-linux-gnu)\r
40 Date: Sun, 16 Dec 2012 08:17:56 +0000\r
41 Message-ID: <8738z6wguj.fsf@qmul.ac.uk>\r
42 MIME-Version: 1.0\r
43 Content-Type: text/plain; charset=utf-8\r
44 Content-Transfer-Encoding: quoted-printable\r
45 X-Sender-Host-Address: 93.97.24.31\r
46 X-QM-SPAM-Info: Sender has good ham record.  :)\r
47 X-QM-Body-MD5: ab382be420668391e371ee7474e8f0e5 (of first 20000 bytes)\r
48 X-SpamAssassin-Score: -1.8\r
49 X-SpamAssassin-SpamBar: -\r
50 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
51         determine if it is\r
52         spam. We require at least 5.0 points to mark a message as spam.\r
53         This message scored -1.8 points.\r
54         Summary of the scoring: \r
55         * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
56         *      medium trust\r
57         *      [138.37.6.40 listed in list.dnswl.org]\r
58         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
59         provider *      (markwalters1009[at]gmail.com)\r
60         *  0.5 AWL AWL: From: address is in the auto white-list\r
61 X-QM-Scan-Virus: ClamAV says the message is clean\r
62 X-BeenThere: notmuch@notmuchmail.org\r
63 X-Mailman-Version: 2.1.13\r
64 Precedence: list\r
65 List-Id: "Use and development of the notmuch mail system."\r
66         <notmuch.notmuchmail.org>\r
67 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
69 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
70 List-Post: <mailto:notmuch@notmuchmail.org>\r
71 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
72 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
73         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
74 X-List-Received-Date: Sun, 16 Dec 2012 08:17:56 -0000\r
75 \r
76 \r
77 On Sun, 09 Dec 2012, Jani Nikula <jani@nikula.org> wrote:\r
78 > ---\r
79 >  test/text |   29 +++++++++++++++++++++++++++++\r
80 >  1 file changed, 29 insertions(+)\r
81 >\r
82 > diff --git a/test/text b/test/text\r
83 > index 428c89b..e003a66 100755\r
84 > --- a/test/text\r
85 > +++ b/test/text\r
86 > @@ -52,4 +52,33 @@ output=3D$(notmuch search --format=3Dtext "t=C3=ABxt-s=\r
87 earch-m=C3=A9ssage" | notmuch_search_s\r
88 >  test_expect_equal "$output" \\r
89 >  "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; text-search-utf8-body=\r
90 -s=C3=BCbj=C3=A9ct (inbox unread)"\r
91 >=20=20\r
92 > +add_email_corpus\r
93 > +\r
94 > +test_begin_subtest "Search message tags: text0"\r
95 > +cat <<EOF > EXPECTED.$test_count\r
96 > +attachment inbox signed unread\r
97 > +EOF\r
98 > +notmuch search --format=3Dtext0 --output=3Dtags '*' | xargs -0 | notmuch=\r
99 _search_sanitize > OUTPUT.$test_count\r
100 > +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count\r
101 > +\r
102 > +test_begin_subtest "Compare text vs. text0 for threads"\r
103 > +notmuch search --format=3Dtext --output=3Dthreads '*' | notmuch_search_s=\r
104 anitize > EXPECTED.$test_count\r
105 > +notmuch search --format=3Dtext0 --output=3Dthreads '*' | xargs -0 -L1 | =\r
106 notmuch_search_sanitize > OUTPUT.$test_count\r
107 > +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count\r
108 \r
109 Hi\r
110 \r
111 These xargs -0 -L1 tests almost pass with format=3Dtext (no zero) passed:\r
112 the output only differs in one newline at the end. Would it be worth\r
113 strengthening the test at all? I don't have any good suggestion but\r
114 replacing the xargs with\r
115 tr '\n\0' ' \n'\r
116 seemed to give clearly different output in the two cases (and the test\r
117 passes as it stands).\r
118 \r
119 OTOH maybe the test before is sufficient in that respect.\r
120 \r
121 Best wishes\r
122 \r
123 Mark\r
124 \r
125 \r
126 > +\r
127 > +test_begin_subtest "Compare text vs. text0 for messages"\r
128 > +notmuch search --format=3Dtext --output=3Dmessages '*' | notmuch_search_=\r
129 sanitize > EXPECTED.$test_count\r
130 > +notmuch search --format=3Dtext0 --output=3Dmessages '*' | xargs -0 -L1 |=\r
131  notmuch_search_sanitize > OUTPUT.$test_count\r
132 > +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count\r
133 > +\r
134 > +test_begin_subtest "Compare text vs. text0 for files"\r
135 > +notmuch search --format=3Dtext --output=3Dfiles '*' | notmuch_search_san=\r
136 itize > EXPECTED.$test_count\r
137 > +notmuch search --format=3Dtext0 --output=3Dfiles '*' | xargs -0 -L1 | no=\r
138 tmuch_search_sanitize > OUTPUT.$test_count\r
139 > +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count\r
140 > +\r
141 > +test_begin_subtest "Compare text vs. text0 for tags"\r
142 > +notmuch search --format=3Dtext --output=3Dtags '*' | notmuch_search_sani=\r
143 tize > EXPECTED.$test_count\r
144 > +notmuch search --format=3Dtext0 --output=3Dtags '*' | xargs -0 -L1 | not=\r
145 much_search_sanitize > OUTPUT.$test_count\r
146 > +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count\r
147 > +\r
148 >  test_done\r
149 > --=20\r
150 > 1.7.10.4\r