[PATCH] test: make test_expect_equal_file() arguments flexible

Jameson Graef Rollins jrollins at finestructure.net
Thu Feb 2 09:40:40 PST 2012


On Wed,  1 Feb 2012 11:19:54 +0400, Dmitry Kurochkin <dmitry.kurochkin at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120202/99189dc3/attachment.pgp>


More information about the notmuch mailing list