1 Return-Path: <novalazy@gmail.com>
\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 AB470431FC2
\r
6 for <notmuch@notmuchmail.org>; Sat, 23 Jun 2012 20:28:26 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, 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 0OA9pHpLmsKV for <notmuch@notmuchmail.org>;
\r
17 Sat, 23 Jun 2012 20:28:25 -0700 (PDT)
\r
18 Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com
\r
19 [209.85.160.53]) (using TLSv1 with cipher RC4-MD5 (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id B04CA431FBD
\r
22 for <notmuch@notmuchmail.org>; Sat, 23 Jun 2012 20:28:25 -0700 (PDT)
\r
23 Received: by mail-pb0-f53.google.com with SMTP id rr13so6402052pbb.26
\r
24 for <notmuch@notmuchmail.org>; Sat, 23 Jun 2012 20:28:25 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
27 bh=1a4IzYi5jOEKR9XQ0XOE50dkPXhspg+5Zl1iVOfjexk=;
\r
28 b=Q2XFWd3vLGV5ZPUStG5GCCi+6XwD4nyVeoLDDjiwjITtWZspqhcsq9Fy+5wNALUtzE
\r
29 0ckRJGA8jhQYa5sckeSieW2pKvQFbaqPRrsR9wXeRpdvDhQmVpIgOrIN3KTuMG5tpPJY
\r
30 huufg6Di0b8sRvMxs5PLDre3NAsHwHXFEaCMXOMFKs5MUDuFVR8Y+JD2KIZUdMbnPauo
\r
31 POqFuRMlUMDEaUiwepPz2k5GlYbObSN4bf/0wajV6AXHXPq+O0cdV0wGAthquUQSywfK
\r
32 2qXcdQ8wzvLi8f5vm/ZqKL4JRHMSbpwSqFHOO95DXWRIspaJZKfWSoF+QGr5htt7VdV2
\r
34 Received: by 10.68.203.7 with SMTP id km7mr26526742pbc.7.1340508505395;
\r
35 Sat, 23 Jun 2012 20:28:25 -0700 (PDT)
\r
36 Received: from localhost (215.42.233.220.static.exetel.com.au.
\r
38 by mx.google.com with ESMTPS id op10sm4072001pbc.75.2012.06.23.20.28.22
\r
39 (version=TLSv1/SSLv3 cipher=OTHER);
\r
40 Sat, 23 Jun 2012 20:28:24 -0700 (PDT)
\r
41 From: Peter Wang <novalazy@gmail.com>
\r
42 To: notmuch@notmuchmail.org
\r
43 Subject: [PATCH 3/3] test: add test for showing Reply-To headers
\r
44 Date: Sun, 24 Jun 2012 13:27:50 +1000
\r
45 Message-Id: <1340508470-16606-3-git-send-email-novalazy@gmail.com>
\r
46 X-Mailer: git-send-email 1.7.4.4
\r
47 In-Reply-To: <1340508470-16606-1-git-send-email-novalazy@gmail.com>
\r
48 References: <1340508470-16606-1-git-send-email-novalazy@gmail.com>
\r
49 X-BeenThere: notmuch@notmuchmail.org
\r
50 X-Mailman-Version: 2.1.13
\r
52 List-Id: "Use and development of the notmuch mail system."
\r
53 <notmuch.notmuchmail.org>
\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
57 List-Post: <mailto:notmuch@notmuchmail.org>
\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
61 X-List-Received-Date: Sun, 24 Jun 2012 03:28:26 -0000
\r
63 Test that show --format=text and --format=json now output
\r
64 Reply-To headers when present.
\r
68 2 files changed, 4 insertions(+), 3 deletions(-)
\r
70 diff --git a/test/json b/test/json
\r
71 index 6439788..0a692ac 100755
\r
74 @@ -3,9 +3,9 @@ test_description="--format=json output"
\r
77 test_begin_subtest "Show message: json"
\r
78 -add_message "[subject]=\"json-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"json-show-message\""
\r
79 +add_message "[subject]=\"json-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"json-show-message\"" "[reply-to]=\"json-show-reply-to\""
\r
80 output=$(notmuch show --format=json "json-show-message")
\r
81 -test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"excluded\": false, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"json-show-message\n\"}]}, []]]]"
\r
82 +test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"excluded\": false, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Reply-To\": \"json-show-reply-to\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"json-show-message\n\"}]}, []]]]"
\r
84 test_begin_subtest "Search message: json"
\r
85 add_message "[subject]=\"json-search-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"json-search-message\""
\r
86 diff --git a/test/text b/test/text
\r
87 index 428c89b..bf1dfd1 100755
\r
90 @@ -3,7 +3,7 @@ test_description="--format=text output"
\r
93 test_begin_subtest "Show message: text"
\r
94 -add_message "[subject]=\"text-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"text-show-message\""
\r
95 +add_message "[subject]=\"text-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"text-show-message\"" "[reply-to]=\"text-show-reply-to\""
\r
96 output=$(notmuch show --format=text "text-show-message" | notmuch_show_sanitize_all)
\r
97 test_expect_equal "$output" "\
\r
99 message{ id:XXXXX depth:0 match:1 excluded:0 filename:XXXXX
\r
100 @@ -12,6 +12,7 @@ Notmuch Test Suite <test_suite@notmuchmail.org> (2000-01-01) (inbox unread)
\r
101 Subject: text-show-subject
\r
102 From: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
103 To: Notmuch Test Suite <test_suite@notmuchmail.org>
\r
104 +Reply-To: text-show-reply-to
\r
105 Date: Sat, 01 Jan 2000 12:00:00 +0000
\r