1 Return-Path: <nex@nexoid.at>
\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 B6FD1431FB6
\r
6 for <notmuch@notmuchmail.org>; Tue, 4 Dec 2012 05:46:58 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0.001 tagged_above=-999 required=5
\r
12 tests=[FREEMAIL_FROM=0.001] 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 iV3MG3RbvVzd for <notmuch@notmuchmail.org>;
\r
16 Tue, 4 Dec 2012 05:46:54 -0800 (PST)
\r
17 Received: from mail.nexoid.at (www.nexoid.at [178.79.130.240])
\r
18 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 7E505431FAE
\r
21 for <notmuch@notmuchmail.org>; Tue, 4 Dec 2012 05:46:54 -0800 (PST)
\r
22 Received: by mail.nexoid.at (Postfix, from userid 1000)
\r
23 id 6F4AA11C109; Tue, 4 Dec 2012 14:46:51 +0100 (CET)
\r
24 From: Peter Feigl <craven@gmx.net>
\r
25 To: notmuch@notmuchmail.org
\r
26 Subject: =?UTF-8?q?=5BPATCH=201/1=5D=20Fixing=20failing=20JSON=20tests=2E?=
\r
27 Date: Tue, 4 Dec 2012 14:46:45 +0100
\r
28 Message-Id: <1354628805-2148-1-git-send-email-craven@gmx.net>
\r
29 X-Mailer: git-send-email 1.8.0
\r
31 Content-Type: text/plain; charset=UTF-8
\r
32 Content-Transfer-Encoding: 8bit
\r
33 X-BeenThere: notmuch@notmuchmail.org
\r
34 X-Mailman-Version: 2.1.13
\r
36 List-Id: "Use and development of the notmuch mail system."
\r
37 <notmuch.notmuchmail.org>
\r
38 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
39 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
40 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
41 List-Post: <mailto:notmuch@notmuchmail.org>
\r
42 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
43 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
44 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
45 X-List-Received-Date: Tue, 04 Dec 2012 13:46:58 -0000
\r
47 Two --format=json tests were failing, both due changes in the output
\r
48 format introduced by the structured formatting code. This patch updates
\r
49 the expected output.
\r
51 test/json | 12 ++----------
\r
52 1 file changed, 2 insertions(+), 10 deletions(-)
\r
54 diff --git a/test/json b/test/json
\r
55 index bfafd55..75b732f 100755
\r
58 @@ -32,7 +32,7 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\",
\r
59 test_begin_subtest "Show message: json, utf-8"
\r
60 add_message "[subject]=\"json-show-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-show-méssage\""
\r
61 output=$(notmuch show --format=json "jsön-show-méssage")
\r
62 -test_expect_equal_json "$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-utf8-body-sübjéct\", \"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\": \"jsön-show-méssage\n\"}]}, []]]]"
\r
63 +test_expect_equal_json "$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-utf8-body-sübjéct\", \"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\": \"jsön-show-méssage\n\"}]}, []]]]"
\r
65 test_begin_subtest "Show message: json, inline attachment filename"
\r
66 subject='json-show-inline-attachment-filename'
\r
67 @@ -50,14 +50,6 @@ test_expect_equal_json "$output" "[[[{\"id\": \"$id\", \"match\": true, \"exclud
\r
68 test_begin_subtest "Search message: json, utf-8"
\r
69 add_message "[subject]=\"json-search-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-search-méssage\""
\r
70 output=$(notmuch search --format=json "jsön-search-méssage" | notmuch_search_sanitize)
\r
71 -test_expect_equal_json "$output" "[{\"thread\": \"XXX\",
\r
72 - \"timestamp\": 946728000,
\r
73 - \"date_relative\": \"2000-01-01\",
\r
76 - \"authors\": \"Notmuch Test Suite\",
\r
77 - \"subject\": \"json-search-utf8-body-sübjéct\",
\r
78 - \"tags\": [\"inbox\",
\r
80 +test_expect_equal_json "$output" "[{\"thread\": \"XXX\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"matched\": 1, \"total\": 1, \"authors\": \"Notmuch Test Suite\", \"subject\": \"json-search-utf8-body-sübjéct\", \"tags\": [\"inbox\", \"unread\"]}]"
\r