Re: search query "replytoid:<blah>"
[notmuch-archives.git] / b4 / e882943e8e6f9819be25b63d4737fb53b304f9
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 olra.theworths.org (Postfix) with ESMTP id 189AA431FBF\r
6         for <notmuch@notmuchmail.org>; Wed, 17 Oct 2012 22:43:25 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 V3Vwm8skSfTX for <notmuch@notmuchmail.org>;\r
16         Wed, 17 Oct 2012 22:43:20 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 518D9431FB6\r
19         for <notmuch@notmuchmail.org>; Wed, 17 Oct 2012 22:43:20 -0700 (PDT)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id D3F941000E5;\r
22         Thu, 18 Oct 2012 08:43:21 +0300 (EEST)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: Ethan Glasser-Camp <ethan.glasser.camp@gmail.com>, notmuch@notmuchmail.org\r
25 Subject: Re: [PATCH] test: handle filenames that have directories in them\r
26 In-Reply-To: <1350074609-21769-1-git-send-email-ethan@betacantrips.com>\r
27 References: <1350074609-21769-1-git-send-email-ethan@betacantrips.com>\r
28 User-Agent: Notmuch/0.14+51~g62cd13b (http://notmuchmail.org) Emacs/24.2.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: Thu, 18 Oct 2012 08:43:21 +0300\r
34 Message-ID: <m2bog01gjq.fsf@guru.guru-group.fi>\r
35 MIME-Version: 1.0\r
36 Content-Type: text/plain\r
37 Cc: Ethan Glasser-Camp <ethan@betacantrips.com>\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Thu, 18 Oct 2012 05:43:25 -0000\r
51 \r
52 On Fri, Oct 12 2012, Ethan Glasser-Camp <ethan.glasser.camp@gmail.com> wrote:\r
53 \r
54 > Since $TEST_DIRECTORY is an absolute path, any filenames generated\r
55 > with it will be complete paths. Only use the basename to generate\r
56 > suffixes for filenames.\r
57 >\r
58 > Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>\r
59 > ---\r
60 > Discovered this while reviewing the patch queue. test/emacs generates\r
61 > filenames using $TEST_DIRECTORY, which is generated using pwd(1). Test\r
62 > failures then cause failures in the test harness.\r
63 \r
64 \r
65 LGTM. \r
66 \r
67 Removing needs-review (for this trivial change) as this helps the\r
68 good review work Ethan is doing :D\r
69 \r
70 Tomi\r
71 \r
72 Ps: some shell "trivia ;)" basename=`basename "$file"` works for variable\r
73 assignment; when giving as argument to command that needs one more quotes:\r
74 e.g. wc "`basename "$file"`"\r
75 fun?!\r
76 \r
77 >\r
78 >  test/test-lib.sh |    8 +++++---\r
79 >  1 file changed, 5 insertions(+), 3 deletions(-)\r
80 >\r
81 > diff --git a/test/test-lib.sh b/test/test-lib.sh\r
82 > index 7448b45..8de5e32 100644\r
83 > --- a/test/test-lib.sh\r
84 > +++ b/test/test-lib.sh\r
85 > @@ -498,16 +498,18 @@ test_expect_equal_file ()\r
86 >       error "bug in the test script: not 2 or 3 parameters to test_expect_equal"\r
87 >  \r
88 >       file1="$1"\r
89 > +     basename1=`basename "$file1"`\r
90 >       file2="$2"\r
91 > +     basename2=`basename "$file2"`\r
92 >       if ! test_skip "$test_subtest_name"\r
93 >       then\r
94 >               if diff -q "$file1" "$file2" >/dev/null ; then\r
95 >                       test_ok_ "$test_subtest_name"\r
96 >               else\r
97 >                       testname=$this_test.$test_count\r
98 > -                     cp "$file1" "$testname.$file1"\r
99 > -                     cp "$file2" "$testname.$file2"\r
100 > -                     test_failure_ "$test_subtest_name" "$(diff -u "$testname.$file1" "$testname.$file2")"\r
101 > +                     cp "$file1" "$testname.$basename1"\r
102 > +                     cp "$file2" "$testname.$basename2"\r
103 > +                     test_failure_ "$test_subtest_name" "$(diff -u "$testname.$basename1" "$testname.$basename2")"\r
104 >               fi\r
105 >      fi\r
106 >  }\r
107 > -- \r
108 > 1.7.9.5\r
109 >\r
110 > _______________________________________________\r
111 > notmuch mailing list\r
112 > notmuch@notmuchmail.org\r
113 > http://notmuchmail.org/mailman/listinfo/notmuch\r