On Fri, Feb 29, 2008 at 11:58:16PM +0100, Mike Hommey wrote: > > > -git reset --hard > > > +git reset --hard >&3 2>&4 > > > test_expect_success 'refuse to merge binary files' ' > > > printf "\0" > binary-file && > > > git add binary-file && > > > > Should this perhaps just be: > > > > test_expect_success 'reset state' 'git reset --hard' > > Is it really about testing git reset ? No, of course not. Nor is t0003 about testing 'setup'. But it is a convention[1] in git tests to do everything inside a test_expect_success wrapper, which is beneficial because: - you get your output handled properly automagically :) - if the setup step fails, we notice. Which means: - it cannot silently cause a later test to succeed (e.g., setup changes a file, then the real test reverts it) - it is easier to debug failing tests, because you are notified of the _first_ failure -Peff [1] By convention, I don't necessarily mean that there is a written rule, nor that we always do it that way, but only that in my experience we usually do. Somebody like Junio could say more definitely what is preferred. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html