1 Return-Path: <jani@nikula.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 178E9431FD4
\r
6 for <notmuch@notmuchmail.org>; Sun, 9 Mar 2014 14:40:53 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
13 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 DC51qVZsvQOd for <notmuch@notmuchmail.org>;
\r
17 Sun, 9 Mar 2014 14:40:47 -0700 (PDT)
\r
18 Received: from mail-la0-f51.google.com (mail-la0-f51.google.com
\r
19 [209.85.215.51]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 01C44431FBF
\r
22 for <notmuch@notmuchmail.org>; Sun, 9 Mar 2014 14:40:43 -0700 (PDT)
\r
23 Received: by mail-la0-f51.google.com with SMTP id pv20so4198472lab.10
\r
24 for <notmuch@notmuchmail.org>; Sun, 09 Mar 2014 14:40:42 -0700 (PDT)
\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
26 d=1e100.net; s=20130820;
\r
27 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
\r
28 :references:in-reply-to:references;
\r
29 bh=d6GR0LirnAVAxtTU6YtVs/HNI5kyL6pbfPn8e8nmxM0=;
\r
30 b=EsYpmEnPixrc9pdT/EiOyzyEvhJ4PGjAoJdtqnhPc0vpXYp0VGQfBywykEIiAJGVvU
\r
31 Hy0AbCJr32a0v/ASReowV3evjSNMBN1DaSWWh2H+YduvEGUHcZJQ3ITM+atx8bRZSe0M
\r
32 sZPdIgUcSAR3pT7Rf9eJxpu2U8G0KefmyXDfvS2UjoQHm2Pl3dYabfO3eM0K2tUfM0CW
\r
33 i6k1BMiK2cuDbwYPdun3gqUrq4jlkD8toP8QyfY5HAAHD0bp/5yP4jjcmoAjAEMfaeUC
\r
34 8oALpJc+Obp5Rv78xuIfPOi9Qumpua2A46x1MdvmJEg08d1yzSrHcD8LhDlfH+J05GBQ
\r
37 ALoCoQmnsdyNETv93HlTnoYqdjQZ9gmydtoZ3pjdURcKVs9LK/QtM/tRoi1/bkKas1cFebpo7m+C
\r
38 X-Received: by 10.112.142.161 with SMTP id rx1mr19576530lbb.33.1394401242370;
\r
39 Sun, 09 Mar 2014 14:40:42 -0700 (PDT)
\r
40 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.
\r
42 by mx.google.com with ESMTPSA id zf7sm26924610lab.7.2014.03.09.14.40.41
\r
43 for <multiple recipients>
\r
44 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
45 Sun, 09 Mar 2014 14:40:41 -0700 (PDT)
\r
46 From: Jani Nikula <jani@nikula.org>
\r
47 To: notmuch@notmuchmail.org
\r
48 Subject: [PATCH v4 02/13] test: add notmuch_search_files_sanitize and use it
\r
49 Date: Sun, 9 Mar 2014 23:40:23 +0200
\r
51 <081062d057f54fcc6dcb5e5d03808a361960bf90.1394400503.git.jani@nikula.org>
\r
52 X-Mailer: git-send-email 1.9.0
\r
53 In-Reply-To: <cover.1394400503.git.jani@nikula.org>
\r
54 References: <cover.1394400503.git.jani@nikula.org>
\r
55 In-Reply-To: <cover.1394400503.git.jani@nikula.org>
\r
56 References: <cover.1394400503.git.jani@nikula.org>
\r
57 X-BeenThere: notmuch@notmuchmail.org
\r
58 X-Mailman-Version: 2.1.13
\r
60 List-Id: "Use and development of the notmuch mail system."
\r
61 <notmuch.notmuchmail.org>
\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
65 List-Post: <mailto:notmuch@notmuchmail.org>
\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
68 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
69 X-List-Received-Date: Sun, 09 Mar 2014 21:40:53 -0000
\r
71 We do this in a lot of places, so make it a helper in the test-lib.
\r
73 test/T090-search-output.sh | 8 ++++----
\r
74 test/T370-search-folder-coherence.sh | 2 +-
\r
75 test/test-lib.sh | 5 +++++
\r
76 3 files changed, 10 insertions(+), 5 deletions(-)
\r
78 diff --git a/test/T090-search-output.sh b/test/T090-search-output.sh
\r
79 index ef28c3d157aa..e0bf8c16aecb 100755
\r
80 --- a/test/T090-search-output.sh
\r
81 +++ b/test/T090-search-output.sh
\r
82 @@ -181,7 +181,7 @@ EOF
\r
83 test_expect_equal_file OUTPUT EXPECTED
\r
85 test_begin_subtest "--output=files"
\r
86 -notmuch search --output=files '*' | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT
\r
87 +notmuch search --output=files '*' | notmuch_search_files_sanitize >OUTPUT
\r
91 @@ -240,7 +240,7 @@ EOF
\r
92 test_expect_equal_file OUTPUT EXPECTED
\r
94 test_begin_subtest "--output=files --duplicate=1"
\r
95 -notmuch search --output=files --duplicate=1 '*' | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT
\r
96 +notmuch search --output=files --duplicate=1 '*' | notmuch_search_files_sanitize >OUTPUT
\r
100 @@ -298,7 +298,7 @@ EOF
\r
101 test_expect_equal_file OUTPUT EXPECTED
\r
103 test_begin_subtest "--output=files --format=json"
\r
104 -notmuch search --format=json --output=files '*' | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT
\r
105 +notmuch search --format=json --output=files '*' | notmuch_search_files_sanitize >OUTPUT
\r
106 cat <<EOF >EXPECTED
\r
107 ["MAIL_DIR/cur/52:2,",
\r
108 "MAIL_DIR/cur/53:2,",
\r
109 @@ -357,7 +357,7 @@ EOF
\r
110 test_expect_equal_file OUTPUT EXPECTED
\r
112 test_begin_subtest "--output=files --format=json --duplicate=2"
\r
113 -notmuch search --format=json --output=files --duplicate=2 '*' | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT
\r
114 +notmuch search --format=json --output=files --duplicate=2 '*' | notmuch_search_files_sanitize >OUTPUT
\r
115 cat <<EOF >EXPECTED
\r
116 ["MAIL_DIR/cur/51:2,"]
\r
118 diff --git a/test/T370-search-folder-coherence.sh b/test/T370-search-folder-coherence.sh
\r
119 index 3f6ec76348c0..5e72a6ccfd3a 100755
\r
120 --- a/test/T370-search-folder-coherence.sh
\r
121 +++ b/test/T370-search-folder-coherence.sh
\r
122 @@ -27,7 +27,7 @@ cat <<EOF >EXPECTED
\r
124 MAIL_DIR/spam/msg-001
\r
126 -notmuch search --output=files id:$id_x | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT
\r
127 +notmuch search --output=files id:$id_x | notmuch_search_files_sanitize >OUTPUT
\r
128 test_expect_equal_file OUTPUT EXPECTED
\r
130 test_begin_subtest "Test matches folder:spam"
\r
131 diff --git a/test/test-lib.sh b/test/test-lib.sh
\r
132 index 66edb7c99f24..837c669ee757 100644
\r
133 --- a/test/test-lib.sh
\r
134 +++ b/test/test-lib.sh
\r
135 @@ -661,6 +661,11 @@ notmuch_search_sanitize ()
\r
136 perl -pe 's/("?thread"?: ?)("?)................("?)/\1\2XXX\3/'
\r
139 +notmuch_search_files_sanitize()
\r
141 + sed -e "s,$MAIL_DIR,MAIL_DIR,"
\r
144 NOTMUCH_SHOW_FILENAME_SQUELCH='s,filename:.*/mail,filename:/XXX/mail,'
\r
145 notmuch_show_sanitize ()
\r