From: Jameson Graef Rollins Date: Thu, 2 Feb 2012 17:40:40 +0000 (+1600) Subject: Re: [PATCH] test: make test_expect_equal_file() arguments flexible X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=dcf9b3869e194b6c613ff69cbf514e8900834e14;p=notmuch-archives.git Re: [PATCH] test: make test_expect_equal_file() arguments flexible --- diff --git a/87/7b71c6d20c6bb17adf8b15896f1c33e4c99758 b/87/7b71c6d20c6bb17adf8b15896f1c33e4c99758 new file mode 100644 index 000000000..0b00e5b6f --- /dev/null +++ b/87/7b71c6d20c6bb17adf8b15896f1c33e4c99758 @@ -0,0 +1,98 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 7C201431FBD + for ; Thu, 2 Feb 2012 09:41:06 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.29 +X-Spam-Level: +X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] 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 mxHBNkZt8KAc for ; + Thu, 2 Feb 2012 09:41:06 -0800 (PST) +Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu + [131.215.239.19]) + by olra.theworths.org (Postfix) with ESMTP id 0A44A431FAE + for ; Thu, 2 Feb 2012 09:41:06 -0800 (PST) +Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1]) + by fire-doxen-postvirus (Postfix) with ESMTP id 9FB363280FA; + Thu, 2 Feb 2012 09:40:52 -0800 (PST) +X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new +Received: from finestructure.net (cpe-76-174-137-84.socal.res.rr.com + [76.174.137.84]) (Authenticated sender: jrollins) + by fire-doxen-submit (Postfix) with ESMTP id 5382A3280F3; + Thu, 2 Feb 2012 09:40:44 -0800 (PST) +Received: by finestructure.net (Postfix, from userid 1000) + id B9EFA291; Thu, 2 Feb 2012 09:40:43 -0800 (PST) +From: Jameson Graef Rollins +To: Dmitry Kurochkin , notmuch@notmuchmail.org +Subject: Re: [PATCH] test: make test_expect_equal_file() arguments flexible +In-Reply-To: <1328080794-24670-1-git-send-email-dmitry.kurochkin@gmail.com> +References: <1328080794-24670-1-git-send-email-dmitry.kurochkin@gmail.com> +User-Agent: Notmuch/0.11+128~g6f388fa (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-pc-linux-gnu) +Date: Thu, 02 Feb 2012 09:40:40 -0800 +Message-ID: <87aa51qgkn.fsf@servo.finestructure.net> +MIME-Version: 1.0 +Content-Type: multipart/signed; boundary="=-=-="; + micalg=pgp-sha256; protocol="application/pgp-signature" +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: Thu, 02 Feb 2012 17:41:06 -0000 + +--=-=-= + +On Wed, 1 Feb 2012 11:19:54 +0400, Dmitry Kurochkin wrote: +> Before the change, test_expect_equal_file() function treated the first +> argument as "actual output file" and the second argument as "expected +> output file". When the test fails, the files are copied for later +> inspection. The first files was copied to "$testname.output" and the +> second file to "$testname.expected". The argument order for +> test_expect_equal_file() is often wrong which results in confusing +> diff output and incorrectly named files. + +After thinking about this some more, I'm taking it all back. I think +this is a fine solution, since it just goes with whatever name the test +is invoked with. Since this is usually just OUTPUT and EXPECTED, it +should all be clear, and the diffs should be fine, even if the ordering +is permuted some places. Sorry about all the chatter. + ++1 + +jamie. + +--=-=-= +Content-Type: application/pgp-signature + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.11 (GNU/Linux) + +iQIcBAEBCAAGBQJPKsqYAAoJEO00zqvie6q8PEcP/ihx7cEc+0bcpUG6Is8n1+GL +44xxyrCZU1oQ/vE5MiZHJB9njQgTDRyaIdNruPnKdx5H6FJ3nKqFByoJLAYSgwIa +NmA3TzdD9N00p0u6+Yt5qiXjn9zopjJ8KkKUr+3sZ3x8qJvsnJyHJaWWFkepz4NU +ob/qeQ8cT2ZArXjIGqmVFgU9peul3vEOK6kaMpRWc639fnn0jNI9xQp4Y/ao2lEJ +0llrPpGtxnoMHvKz/oTZOJ9jmhoBPwynmWgHcltnawQm5mQfQtOqGSwMX3Tq0eh6 +OERcir+fFlmJyzLnWzSyyck77cvD8lWdxlEfFir9hrEGOxHoGNMCL6OLrQ8dBJc+ +02aY9/pun9Oe5d34OAGHw9A85+hF14lYXG6MRYSRjp2Ox10Z2u1gLF2qY766uFGn +wH6DZdqF87sm1NmCz9PuJCc3Osi2iiwKWZFA+hAf0lCtsb3YNvbixKwHIbfletXB +aUD17WeunOytjW4vB1Pztk7l/2W9/33oZacRJLQAQmRC8jX0dYSBtsmUgE7reIbV +de8U1Ke2JBr4mwyZDOoRBtwXiMwLFa1GQd09h/BdfBu9pFul29+P54l2mtTQimte +zejc0dux8CJ+q4pENDRy0CsJvHc9mx30NW5dPD1dSRbbblegtYmvbkHjBorVOCFw +TWKtxGMfnVifjvS1yBqi +=gS+h +-----END PGP SIGNATURE----- +--=-=-=--