Re: [PATCH v4 06/12] test: add tests for insert
[notmuch-archives.git] / 03 / a6407954e681125da7880f6dd6c2c7db4c7aad
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 4FE11431FAF\r
6         for <notmuch@notmuchmail.org>; Sat, 20 Oct 2012 20:03:26 -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.799\r
10 X-Spam-Level: \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 91IxkyCWGXmS for <notmuch@notmuchmail.org>;\r
17         Sat, 20 Oct 2012 20:03:25 -0700 (PDT)\r
18 Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com\r
19         [209.85.220.53]) (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 0A37A431FAE\r
22         for <notmuch@notmuchmail.org>; Sat, 20 Oct 2012 20:03:24 -0700 (PDT)\r
23 Received: by mail-pa0-f53.google.com with SMTP id bj3so1406965pad.26\r
24         for <notmuch@notmuchmail.org>; Sat, 20 Oct 2012 20:03:24 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=date:message-id:from:to:subject:in-reply-to:references:mime-version\r
27         :content-type:content-disposition:content-transfer-encoding;\r
28         bh=GVNiFU7YL7wxoyjOh75fYdpSyyBqFQlkkLAwv48T9fU=;\r
29         b=dGMBxo+I0vfV0XkxIXRqgYdrhc/KlT7xrgGsg+Ppbfz0Z4H1Q6S1KCk/ewLIJXpEbn\r
30         GsNw5IR9PpCNt8Uq+6yxZ+drlxxx2HwckuXHPUlOwWxrrOt7J/Jhq3yE2gwxcbkh5jBm\r
31         V6RpTlkDSThoBRLJuWNav7IvCf0gZUJOALkUYLq0XKykt5PjjS3gT1SN5cSZOAx464cf\r
32         f6qwjCxkbP6ubw1qPkNF/rUbjT30TcGZ1HOeKeeJPsZlYul9XjLoluJJ0XLKqeQlcB/t\r
33         r22VXxTk8SY8wc/RwDvzxa73QScXmVNrHMM4jMLqmKcN2sIun7wwau65Sn4Q+snHfnjs\r
34         livg==\r
35 Received: by 10.66.87.163 with SMTP id az3mr15974808pab.62.1350788604120;\r
36         Sat, 20 Oct 2012 20:03:24 -0700 (PDT)\r
37 Received: from localhost (215.42.233.220.static.exetel.com.au.\r
38         [220.233.42.215])\r
39         by mx.google.com with ESMTPS id un16sm3670572pbc.47.2012.10.20.20.03.21\r
40         (version=TLSv1/SSLv3 cipher=OTHER);\r
41         Sat, 20 Oct 2012 20:03:23 -0700 (PDT)\r
42 Date: Sun, 21 Oct 2012 14:03:11 +1100\r
43 Message-ID: <20121021140311.GC4820@hili.localdomain>\r
44 From: Peter Wang <novalazy@gmail.com>\r
45 To: notmuch@notmuchmail.org\r
46 Subject: Re: [PATCH v2 3/3] test: conform to content length, encoding fields\r
47 In-Reply-To: <877gql7uit.fsf@betacantrips.com>\r
48 References: <1344428872-12374-1-git-send-email-novalazy@gmail.com>\r
49         <1344428872-12374-4-git-send-email-novalazy@gmail.com>\r
50         <877gql7uit.fsf@betacantrips.com>\r
51 MIME-Version: 1.0\r
52 Content-Type: text/plain; charset=utf-8\r
53 Content-Disposition: inline\r
54 Content-Transfer-Encoding: 8bit\r
55 X-BeenThere: notmuch@notmuchmail.org\r
56 X-Mailman-Version: 2.1.13\r
57 Precedence: list\r
58 List-Id: "Use and development of the notmuch mail system."\r
59         <notmuch.notmuchmail.org>\r
60 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
62 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
63 List-Post: <mailto:notmuch@notmuchmail.org>\r
64 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
65 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
66         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
67 X-List-Received-Date: Sun, 21 Oct 2012 03:03:26 -0000\r
68 \r
69 On Fri, 19 Oct 2012 22:21:46 -0400, Ethan Glasser-Camp <ethan.glasser.camp@gmail.com> wrote:\r
70 > > diff --git a/test/json b/test/json\r
71 > > index ac8fa8e..8ce2e8a 100755\r
72 > > --- a/test/json\r
73 > > +++ b/test/json\r
74 > > @@ -45,7 +45,7 @@ emacs_deliver_message \\r
75 > >       (insert \"Message-ID: <$id>\n\")"\r
76 > >  output=$(notmuch show --format=json "id:$id")\r
77 > >  filename=$(notmuch search --output=files "id:$id")\r
78 > > -test_expect_equal_json "$output" "[[[{\"id\": \"$id\", \"match\": true, \"excluded\": false, \"filename\": \"$filename\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\"], \"headers\": {\"Subject\": \"$subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"test_suite@notmuchmail.org\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"multipart/mixed\", \"content\": [{\"id\": 2, \"content-type\": \"text/plain\", \"content\": \"This is a test message with inline attachment with a filename\"}, {\"id\": 3, \"content-type\": \"application/octet-stream\", \"filename\": \"README\"}]}]}, []]]]"\r
79 > > +test_expect_equal_json "$output" "[[[{\"id\": \"$id\", \"match\": true, \"excluded\": false, \"filename\": \"$filename\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\"], \"headers\": {\"Subject\": \"$subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"test_suite@notmuchmail.org\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"multipart/mixed\", \"content\": [{\"id\": 2, \"content-type\": \"text/plain\", \"content\": \"This is a test message with inline attachment with a filename\"}, {\"id\": 3, \"content-type\": \"application/octet-stream\", \"content-length\": 12392, \"content-transfer-encoding\": \"base64\", \"filename\": \"README\"}]}]}, []]]]"\r
80\r
81 > This test fails for me. You're encoding the content-length of\r
82 > test/README. test/README certainly hasn't changed in the last six months\r
83 > so that seems like a reasonable thing to do... except then why is it\r
84 > 12392 on your machine, and 12380 on mine?\r
85 \r
86 README was changed in 1ffb38.  Hardcoding the length was clearly a\r
87 bad idea, so I will send a replacement patch.\r
88 \r
89 Peter\r