From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 85A2A6DE1372 for ; Wed, 23 Nov 2016 08:59:44 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.006 X-Spam-Level: X-Spam-Status: No, score=-0.006 tagged_above=-999 required=5 tests=[AWL=0.005, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N7zLpAN1CXdl for ; Wed, 23 Nov 2016 08:59:44 -0800 (PST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id E45956DE12DD for ; Wed, 23 Nov 2016 08:59:43 -0800 (PST) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1c9atE-0001nx-Bc; Wed, 23 Nov 2016 11:59:20 -0500 Received: (nullmailer pid 459 invoked by uid 1000); Wed, 23 Nov 2016 16:59:38 -0000 From: David Bremner To: Daniel Kahn Gillmor , Notmuch Mail Subject: Re: [PATCH] tests: account for varying-size OpenPGP signatures In-Reply-To: <20161123164112.27847-1-dkg@fifthhorseman.net> References: <87eg23i052.fsf@alice.fifthhorseman.net> <20161123164112.27847-1-dkg@fifthhorseman.net> Date: Wed, 23 Nov 2016 12:59:38 -0400 Message-ID: <8760neku85.fsf@tesseract.cs.unb.ca> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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: Wed, 23 Nov 2016 16:59:44 -0000 Daniel Kahn Gillmor writes: > @@ -37,7 +37,8 @@ test_expect_success 'emacs delivery of signed message' \ > test_begin_subtest "signature verification" > output=$(notmuch show --format=json --verify subject:"test signed message 001" \ > | notmuch_json_show_sanitize \ > - | sed -e 's|"created": [1234567890]*|"created": 946728000|') > + | sed -e 's|"created": [1234567890]*|"created": 946728000|' \ > + -e 's/"content-length": [1-9][0-9]*/"content-length": "NONZERO"/') there are a bunch of sed oneliners (or perl equivalent) collected in test-lib.sh as functions test_*_sanitize. I wonder if that would be worthwhile here, to have one place to update regexps etc... Something in the style of notmuch_show_sanitize wrapping a call to notmuch_json_show_sanitize