1 Return-Path: <cworth@cworth.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 2F2B64196F2
\r
6 for <notmuch@notmuchmail.org>; Wed, 14 Apr 2010 17:35:46 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.89 tagged_above=-999 required=5
\r
12 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, T_MIME_NO_TEXT=0.01]
\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 d9jt62db+Z8r; Wed, 14 Apr 2010 17:35:45 -0700 (PDT)
\r
17 Received: from yoom.home.cworth.org (localhost [127.0.0.1])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 58206431FC1;
\r
19 Wed, 14 Apr 2010 17:35:45 -0700 (PDT)
\r
20 Received: by yoom.home.cworth.org (Postfix, from userid 1000)
\r
21 id 02E6E568DE1; Wed, 14 Apr 2010 17:35:45 -0700 (PDT)
\r
22 From: Carl Worth <cworth@cworth.org>
\r
23 To: Gregor Hoffleit <gregor@hoffleit.de>, notmuch <notmuch@notmuchmail.org>
\r
24 Subject: Re: [PATCH] First tests for JSON output and UTF-8 in mail body and
\r
26 In-Reply-To: <1271176622-sup-4680@sam.mediasupervision.de>
\r
27 References: <1267697893-sup-4538@sam.mediasupervision.de>
\r
28 <87r5mje55l.fsf@yoom.home.cworth.org>
\r
29 <1271176622-sup-4680@sam.mediasupervision.de>
\r
30 Date: Wed, 14 Apr 2010 17:35:44 -0700
\r
31 Message-ID: <87iq7tft7j.fsf@yoom.home.cworth.org>
\r
33 Content-Type: multipart/signed; boundary="=-=-=";
\r
34 micalg=pgp-sha1; protocol="application/pgp-signature"
\r
35 X-BeenThere: notmuch@notmuchmail.org
\r
36 X-Mailman-Version: 2.1.13
\r
38 List-Id: "Use and development of the notmuch mail system."
\r
39 <notmuch.notmuchmail.org>
\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
41 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
43 List-Post: <mailto:notmuch@notmuchmail.org>
\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
47 X-List-Received-Date: Thu, 15 Apr 2010 00:35:46 -0000
\r
50 Content-Transfer-Encoding: quoted-printable
\r
52 On Tue, 13 Apr 2010 18:37:57 +0200, Gregor Hoffleit <gregor@hoffleit.de> wr=
\r
54 > The test suite doesn't yet cover --format=3Djson output nor UTF-8 in
\r
57 > This patch starts with test cases for 'search --format=3Djson' and
\r
58 > 'show --format=3Djson'.
\r
60 Thanks for the tests, Gregor!
\r
62 I was about to push this, but first noticed that I hadn't run the test
\r
63 suite in the last day and that it had recently broken (oops!). I fixed
\r
64 that, but then also noticed that I got failures with your tests.
\r
67 > +execute_expecting "show --format=3Djson 'json-show-message'" '[[[{"id":
\r
68 > "'${gen_msg_id}'", "match": true, "filename": "'${gen_msg_filename}'",
\r
69 > "date_unix": 946728000, "date_relative": "2000-01-01", "tags":
\r
71 > +printf " Search message: json...\t"
\r
72 > +add_message '[subject]=3D"json-search-subject"' '[date]=3D"Sat, 01 Jan 2=
\r
73 000 12:00:00 -0000"' '[body]=3D"json-search-message"'
\r
74 > +execute_expecting "search --format=3Djson 'json-search-message'" '[{"thr=
\r
76 > +"timestamp": 946724400,
\r
78 I'm getting a timestamp value here of 946756800 which is clearly an
\r
79 interpretation of the above date as if it were my local time zone. That
\r
82 $ date -u +%s -d "Sat, 01 Jan 2000 12:00:00 -0800"
\r
85 And the value you have appears to have been generated in your timezone:
\r
87 $ date -u +%s -d "Sat, 01 Jan 2000 12:00:00 +0100"
\r
90 Meanwhile, the value that should be printed here[*] is the value from
\r
91 interpreting the original date in the timezone explicitly specified in
\r
94 $ date -u +%s -d "Sat, 01 Jan 2000 12:00:00 -0000"
\r
97 Note that the "notmuch show --format=3Djson" test above does have the
\r
100 So, a double thanks for this test, it seems to have uncovered another
\r
105 [*] I say "should" because I don't believe we have any actual
\r
106 specification of the data coming out of the JSON output yet. One other
\r
107 thing that seems odd is the name of "date_unix" in the show output and
\r
108 "timestamp" in the search output for what is effectively the same
\r
115 Content-Type: application/pgp-signature
\r
117 -----BEGIN PGP SIGNATURE-----
\r
118 Version: GnuPG v1.4.10 (GNU/Linux)
\r
120 iD8DBQFLxl9g6JDdNq8qSWgRAtS3AJ0XQoqOytRvOrmILHtm2KHWM0d1OACgiXXm
\r
121 4notoObIRxHor9YNu9BcLh8=
\r
123 -----END PGP SIGNATURE-----
\r