Re: [PATCH] test: make test_expect_equal_file() arguments flexible

Subject: Re: [PATCH] test: make test_expect_equal_file() arguments flexible

Date: Thu, 02 Feb 2012 09:40:40 -0800

To: Dmitry Kurochkin, notmuch@notmuchmail.org

Cc:

From: Jameson Graef Rollins


On Wed,  1 Feb 2012 11:19:54 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> 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.
part-000.sig (application/pgp-signature)

Thread: