1 Return-Path: <tomi.ollila@iki.fi>
\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 arlo.cworth.org (Postfix) with ESMTP id 399EA6DE119D
\r
6 for <notmuch@notmuchmail.org>; Sat, 23 Jan 2016 08:33:31 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=0.658 tagged_above=-999 required=5 tests=[AWL=0.006,
\r
12 SPF_NEUTRAL=0.652] autolearn=disabled
\r
13 Received: from arlo.cworth.org ([127.0.0.1])
\r
14 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id giHmxt9wqY0Q for <notmuch@notmuchmail.org>;
\r
16 Sat, 23 Jan 2016 08:33:28 -0800 (PST)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by arlo.cworth.org (Postfix) with ESMTP id 9993B6DE0B27
\r
19 for <notmuch@notmuchmail.org>; Sat, 23 Jan 2016 08:33:27 -0800 (PST)
\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])
\r
21 by guru.guru-group.fi (Postfix) with ESMTP id EC32610004A;
\r
22 Sat, 23 Jan 2016 18:33:36 +0200 (EET)
\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
24 To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
\r
25 Subject: Re: [PATCH] test: refactor directory name sanitization
\r
26 In-Reply-To: <1453553366-7454-1-git-send-email-david@tethera.net>
\r
27 References: <1453553366-7454-1-git-send-email-david@tethera.net>
\r
28 User-Agent: Notmuch/0.21+32~g73439f8 (http://notmuchmail.org) Emacs/24.3.1
\r
29 (x86_64-unknown-linux-gnu)
\r
30 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
31 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
32 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
33 Date: Sat, 23 Jan 2016 18:33:36 +0200
\r
34 Message-ID: <m2mvrws1b3.fsf@guru.guru-group.fi>
\r
36 Content-Type: text/plain
\r
37 X-BeenThere: notmuch@notmuchmail.org
\r
38 X-Mailman-Version: 2.1.20
\r
40 List-Id: "Use and development of the notmuch mail system."
\r
41 <notmuch.notmuchmail.org>
\r
42 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
45 List-Post: <mailto:notmuch@notmuchmail.org>
\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
47 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
49 X-List-Received-Date: Sat, 23 Jan 2016 16:33:31 -0000
\r
51 On Sat, Jan 23 2016, David Bremner <david@tethera.net> wrote:
\r
53 > test_C and notmuch_search_files_sanitize were giving different output on
\r
54 > the same path, which is not technically wrong, but slightly
\r
57 > test/T560-lib-error.sh | 2 +-
\r
58 > test/test-lib.sh | 11 ++++++++---
\r
59 > 2 files changed, 9 insertions(+), 4 deletions(-)
\r
61 > diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh
\r
62 > index c280939..59a479c 100755
\r
63 > --- a/test/T560-lib-error.sh
\r
64 > +++ b/test/T560-lib-error.sh
\r
65 > @@ -183,7 +183,7 @@ int main (int argc, char** argv)
\r
67 > cat <<'EOF' >EXPECTED
\r
69 > -Path already exists: CWD/mail
\r
70 > +Path already exists: MAIL_DIR
\r
74 > diff --git a/test/test-lib.sh b/test/test-lib.sh
\r
75 > index 0c9b366..c8f14d9 100644
\r
76 > --- a/test/test-lib.sh
\r
77 > +++ b/test/test-lib.sh
\r
78 > @@ -684,9 +684,14 @@ notmuch_search_sanitize ()
\r
79 > perl -pe 's/("?thread"?: ?)("?)................("?)/\1\2XXX\3/'
\r
82 > -notmuch_search_files_sanitize()
\r
83 > +notmuch_search_files_sanitize ()
\r
85 > - sed -e "s,$MAIL_DIR,MAIL_DIR,"
\r
86 > + notmuch_dir_sanitize
\r
89 > +notmuch_dir_sanitize ()
\r
91 > + sed -e "s,$MAIL_DIR,MAIL_DIR," -e "s,${PWD},CWD,g" "$@"
\r
93 Looks good, ^^ \ but 2 spaces there
\r
97 > NOTMUCH_SHOW_FILENAME_SQUELCH='s,filename:.*/mail,filename:/XXX/mail,'
\r
98 > @@ -1186,7 +1191,7 @@ test_C () {
\r
99 > echo "== stdout ==" > OUTPUT.stdout
\r
100 > echo "== stderr ==" > OUTPUT.stderr
\r
101 > ./${exec_file} "$@" 1>>OUTPUT.stdout 2>>OUTPUT.stderr
\r
102 > - sed "s,${PWD},CWD,g" OUTPUT.stdout OUTPUT.stderr > OUTPUT
\r
103 > + notmuch_dir_sanitize OUTPUT.stdout OUTPUT.stderr > OUTPUT
\r
105 Ditto, although this was th^^ere before, but now these 2 could be amended.
\r
107 BTW: I trust you tested. I did not.
\r
112 BTW2: MAIL_DIR is based on user's current CWD(*) -- if that contains commas
\r
113 (,) then things will break ;/
\r
115 (*) +++(./test-lib-common.sh:148): MAIL_DIR=/home/user/vc/ext/notmuch/test/tmp.test-verbose/mail
\r