Re: [PATCH v2 01/18] t1404: new tests of ref D/F conflicts within transactions
- From
Michael Haggerty <mhagger@alum.mit.edu>
- Date
- May 12, 2015, 08:32 UTC
- Message-ID
- <5551BA88.3090900@alum.mit.edu>
- In-Reply-To
- <xmqqlhgu3nyl.fsf@gitster.dls.corp.google.com>
On 05/11/2015 09:37 PM, Junio C Hamano wrote:
Show 23 quoted lines
> Michael Haggerty <mhagger@alum.mit.edu> writes:
>
>> +test_update_rejected () {
>> + prefix="$1" &&
>> + before="$2" &&
>> + pack="$3" &&
>> + create="$4" &&
>> + error="$5" &&
>> + printf "create $prefix/%s $C\n" $before |
>> + git update-ref --stdin &&
>> + git for-each-ref $prefix >unchanged &&
>> + if $pack
>> + then
>> + git pack-refs --all
>> + fi &&
>> + printf "create $prefix/%s $C\n" $create >input &&
>> + test_must_fail git update-ref --stdin <input 2>output.err &&
>> + grep -F "$error" output.err &&
>
> I am not 100% confident that "grep -F" is the right thing to use
> here. I checked all the error message these tests are expecting and
> none seems to go through _(), but is it fundamental that these
> errors should not be translated?Aren't tests run in the "C" locale so that tests don't have to worry about i18n?
Regarding "grep -F", what would be a better alternative, given that I want to test that the conflict is being reported correctly?
Michael
-- Michael Haggerty mhagger@alum.mit.edu