Re: [PATCH v2 3/3] test: conform to content length, encoding fields
authorPeter Wang <novalazy@gmail.com>
Sun, 21 Oct 2012 03:03:11 +0000 (14:03 +1100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:55 +0000 (09:49 -0800)
03/a6407954e681125da7880f6dd6c2c7db4c7aad [new file with mode: 0644]

diff --git a/03/a6407954e681125da7880f6dd6c2c7db4c7aad b/03/a6407954e681125da7880f6dd6c2c7db4c7aad
new file mode 100644 (file)
index 0000000..fa231f8
--- /dev/null
@@ -0,0 +1,89 @@
+Return-Path: <novalazy@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 4FE11431FAF\r
+       for <notmuch@notmuchmail.org>; Sat, 20 Oct 2012 20:03:26 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 91IxkyCWGXmS for <notmuch@notmuchmail.org>;\r
+       Sat, 20 Oct 2012 20:03:25 -0700 (PDT)\r
+Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com\r
+       [209.85.220.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 0A37A431FAE\r
+       for <notmuch@notmuchmail.org>; Sat, 20 Oct 2012 20:03:24 -0700 (PDT)\r
+Received: by mail-pa0-f53.google.com with SMTP id bj3so1406965pad.26\r
+       for <notmuch@notmuchmail.org>; Sat, 20 Oct 2012 20:03:24 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=date:message-id:from:to:subject:in-reply-to:references:mime-version\r
+       :content-type:content-disposition:content-transfer-encoding;\r
+       bh=GVNiFU7YL7wxoyjOh75fYdpSyyBqFQlkkLAwv48T9fU=;\r
+       b=dGMBxo+I0vfV0XkxIXRqgYdrhc/KlT7xrgGsg+Ppbfz0Z4H1Q6S1KCk/ewLIJXpEbn\r
+       GsNw5IR9PpCNt8Uq+6yxZ+drlxxx2HwckuXHPUlOwWxrrOt7J/Jhq3yE2gwxcbkh5jBm\r
+       V6RpTlkDSThoBRLJuWNav7IvCf0gZUJOALkUYLq0XKykt5PjjS3gT1SN5cSZOAx464cf\r
+       f6qwjCxkbP6ubw1qPkNF/rUbjT30TcGZ1HOeKeeJPsZlYul9XjLoluJJ0XLKqeQlcB/t\r
+       r22VXxTk8SY8wc/RwDvzxa73QScXmVNrHMM4jMLqmKcN2sIun7wwau65Sn4Q+snHfnjs\r
+       livg==\r
+Received: by 10.66.87.163 with SMTP id az3mr15974808pab.62.1350788604120;\r
+       Sat, 20 Oct 2012 20:03:24 -0700 (PDT)\r
+Received: from localhost (215.42.233.220.static.exetel.com.au.\r
+       [220.233.42.215])\r
+       by mx.google.com with ESMTPS id un16sm3670572pbc.47.2012.10.20.20.03.21\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Sat, 20 Oct 2012 20:03:23 -0700 (PDT)\r
+Date: Sun, 21 Oct 2012 14:03:11 +1100\r
+Message-ID: <20121021140311.GC4820@hili.localdomain>\r
+From: Peter Wang <novalazy@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2 3/3] test: conform to content length, encoding fields\r
+In-Reply-To: <877gql7uit.fsf@betacantrips.com>\r
+References: <1344428872-12374-1-git-send-email-novalazy@gmail.com>\r
+       <1344428872-12374-4-git-send-email-novalazy@gmail.com>\r
+       <877gql7uit.fsf@betacantrips.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: 8bit\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 21 Oct 2012 03:03:26 -0000\r
+\r
+On Fri, 19 Oct 2012 22:21:46 -0400, Ethan Glasser-Camp <ethan.glasser.camp@gmail.com> wrote:\r
+> > diff --git a/test/json b/test/json\r
+> > index ac8fa8e..8ce2e8a 100755\r
+> > --- a/test/json\r
+> > +++ b/test/json\r
+> > @@ -45,7 +45,7 @@ emacs_deliver_message \\r
+> >       (insert \"Message-ID: <$id>\n\")"\r
+> >  output=$(notmuch show --format=json "id:$id")\r
+> >  filename=$(notmuch search --output=files "id:$id")\r
+> > -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
+> > +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
+> \r
+> This test fails for me. You're encoding the content-length of\r
+> test/README. test/README certainly hasn't changed in the last six months\r
+> so that seems like a reasonable thing to do... except then why is it\r
+> 12392 on your machine, and 12380 on mine?\r
+\r
+README was changed in 1ffb38.  Hardcoding the length was clearly a\r
+bad idea, so I will send a replacement patch.\r
+\r
+Peter\r