Re: [PATCH 1/6] test patch hunk editing with "commit -p -m"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 6, 2014, 23:11 UTC
- Message-ID
- <xmqq61nqx6qj.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CAPig+cTTCsMDJ_B73+cbedrxoEqbM_txV6JYWmCq-LyX12TpNw@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 9 quoted lines
>> +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.