1 Return-Path: <ethan.glasser.camp@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 22102431FBD
\r
6 for <notmuch@notmuchmail.org>; Fri, 19 Oct 2012 19:21:54 -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 bzpkI2awr55I for <notmuch@notmuchmail.org>;
\r
17 Fri, 19 Oct 2012 19:21:52 -0700 (PDT)
\r
18 Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com
\r
19 [209.85.220.181]) (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 C11B4431FAE
\r
22 for <notmuch@notmuchmail.org>; Fri, 19 Oct 2012 19:21:52 -0700 (PDT)
\r
23 Received: by mail-vc0-f181.google.com with SMTP id n11so1232678vch.26
\r
24 for <notmuch@notmuchmail.org>; Fri, 19 Oct 2012 19:21:52 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=from:to:subject:in-reply-to:references:user-agent:date:message-id
\r
27 :mime-version:content-type;
\r
28 bh=IA8AT1hJRd8y3hQkhlfztVsXyqnQmZ8cInBQVaYVlIs=;
\r
29 b=znGLbSEngVozpDZS5t9xbe78X6WEpk0fB/3VptoRHodCmtPCee8Q6SnhgL/ZtCdfjJ
\r
30 4nsLozopjDmDH/K5TcssG9HfRcqPT+kPqXWRevsR1R6CfJY1lo6re93PonHZ962+27L3
\r
31 OqUCSquPyolihrrhMRdE91kZArHEdoMp/19v1eJNJN6C/L77q6v+zi4WLxCnHivq6pMD
\r
32 Uc9MoZRJlplQzngjy9V92kKLLgmg592j9dT7pxYv7uZeSu9Z21CVmtOtSVV+mDDjAkjl
\r
33 VxFj2fhyswJd68zsDuzOwwefeG/8d9BhvkaWB34FXiq4EGl4MaFnxfzrVANtk0uERDwH
\r
35 Received: by 10.220.157.75 with SMTP id a11mr4077253vcx.27.1350699712239;
\r
36 Fri, 19 Oct 2012 19:21:52 -0700 (PDT)
\r
37 Received: from smtp.gmail.com (p70-80.acedsl.com. [66.114.70.80])
\r
38 by mx.google.com with ESMTPS id dq8sm2682429vdc.4.2012.10.19.19.21.50
\r
39 (version=TLSv1/SSLv3 cipher=OTHER);
\r
40 Fri, 19 Oct 2012 19:21:51 -0700 (PDT)
\r
41 From: Ethan Glasser-Camp <ethan.glasser.camp@gmail.com>
\r
42 To: Peter Wang <novalazy@gmail.com>, notmuch@notmuchmail.org
\r
43 Subject: Re: [PATCH v2 3/3] test: conform to content length, encoding fields
\r
44 In-Reply-To: <1344428872-12374-4-git-send-email-novalazy@gmail.com>
\r
45 References: <1344428872-12374-1-git-send-email-novalazy@gmail.com>
\r
46 <1344428872-12374-4-git-send-email-novalazy@gmail.com>
\r
47 User-Agent: Notmuch/0.14+45~g6ea9330 (http://notmuchmail.org) Emacs/23.3.1
\r
48 (x86_64-pc-linux-gnu)
\r
49 Date: Fri, 19 Oct 2012 22:21:46 -0400
\r
50 Message-ID: <877gql7uit.fsf@betacantrips.com>
\r
52 Content-Type: text/plain; charset=us-ascii
\r
53 X-BeenThere: notmuch@notmuchmail.org
\r
54 X-Mailman-Version: 2.1.13
\r
56 List-Id: "Use and development of the notmuch mail system."
\r
57 <notmuch.notmuchmail.org>
\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
61 List-Post: <mailto:notmuch@notmuchmail.org>
\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
65 X-List-Received-Date: Sat, 20 Oct 2012 02:21:54 -0000
\r
67 Peter Wang <novalazy@gmail.com> writes:
\r
69 > Update tests to expect content-length and content-transfer-encoding
\r
70 > fields in show --format=json output, for leaf parts with omitted body
\r
73 These three patches all look fine to me, except for the following
\r
76 > diff --git a/test/json b/test/json
\r
77 > index ac8fa8e..8ce2e8a 100755
\r
80 > @@ -45,7 +45,7 @@ emacs_deliver_message \
\r
81 > (insert \"Message-ID: <$id>\n\")"
\r
82 > output=$(notmuch show --format=json "id:$id")
\r
83 > filename=$(notmuch search --output=files "id:$id")
\r
84 > -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
85 > +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
87 This test fails for me. You're encoding the content-length of
\r
88 test/README. test/README certainly hasn't changed in the last six months
\r
89 so that seems like a reasonable thing to do... except then why is it
\r
90 12392 on your machine, and 12380 on mine? I don't object to using
\r
91 test/README as a simple file to test with, but then you certainly
\r
92 shouldn't hard-code its length. You could pipe test/README through
\r
93 base64 and then through wc -c to get an accurate length, but for my
\r
94 machine a newline gets appended by base64 I think, and it gives me
\r
97 I'm tagging this patch moreinfo but you would have my +1 if you fix
\r