From: Junio C Hamano Date: Thu, 06 Mar 2014 23:11:32 GMT Subject: Re: [PATCH 1/6] test patch hunk editing with "commit -p -m" Message-ID: In-Reply-To: Eric Sunshine writes: >> +test_expect_failure 'edit hunk "commit -p -m message"' ' >> + echo e | env GIT_EDITOR="sed s/+line3\$/+line2/ -i" git commit -p -m commit2 file && >> + git diff HEAD^ HEAD >diff && >> + test_cmp expected diff >> +' > > If you ever add more tests, is it likely that they will be using the > same 'expected' file used by this test? If not, perhaps it makes sense > to move creation of 'expected' into the test itself. All good points. Also, I think we try to use "expect" (not "expected") vs "actual" (not "diff") in most of the tests.