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