Re: [PATCH] Avoid difference in tr semantics between System V and BSD
- From
Ben Walton <bdwalton@gmail.com>
- Date
- Oct 28, 2013, 21:04 UTC
- Message-ID
- <CAP30j179XPZqTGiZuvyZEL94Q14ocas+r8mP_R4gLetWwikkwA@mail.gmail.com>
- In-Reply-To
- <xmqqk3gxfc20.fsf@gitster.dls.corp.google.com>
I'm happy to defer to your judgement on this - If you'd like the tests wrapped, I'll do so.
Thanks -Ben
On Mon, Oct 28, 2013 at 7:08 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 55 quoted lines
> Jonathan Nieder <jrnieder@gmail.com> writes:
>
>> Johannes Sixt wrote:
>>
>>> In other tests, we check for prerequisite PERL, i.e., we are prepared
>>> that perl is not available. Shouldn't we do that here, too?
>>
>> I think the tests assume there's a perl present even when the PERL
>> prereq isn't present already. E.g.:
>>
>> nul_to_q () {
>> "$PERL_PATH" -pe 'y/\000/Q/'
>> }
>>
>> So in practice the PERL prereq just means "NO_PERL wasn't set", or
>> in other words, "commands that use perl work". Maybe something
>> like the following would help?
>>
>> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
>>
>> diff --git i/t/README w/t/README
>> index 2167125..54cd064 100644
>> --- i/t/README
>> +++ w/t/README
>> @@ -629,11 +629,20 @@ See the prereq argument to the test_* functions in the "Test harness
>> library" section above and the "test_have_prereq" function for how to
>> use these, and "test_set_prereq" for how to define your own.
>>
>> - - PERL & PYTHON
>> + - PYTHON
>>
>> - Git wasn't compiled with NO_PERL=YesPlease or
>> - NO_PYTHON=YesPlease. Wrap any tests that need Perl or Python in
>> - these.
>> + Git wasn't compiled with NO_PYTHON=YesPlease. Wrap any tests that
>> + need Python with this.
>> +
>> + - PERL
>> +
>> + Git wasn't compiled with NO_PERL=YesPlease.
>> +
>> + Even without the PERL prerequisite, tests can assume there is a
>> + usable perl interpreter at $PERL_PATH, though it need not be
>> + particularly modern.
>> +
>> + Wrap tests for commands implemented in Perl with this.
>
> Sounds like a sensible thing to address, but I first parsed it as
>
> Wrap (tests for (commands implemented in Perl)) with this.
>
> while I think the readers are expected to parse it as
>
> Wrap ((tests for commands) implemented in Perl) with this.
>-- --------------------------------------------------------------------------------------------------------------------------- Take the risk of thinking for yourself. Much more happiness, truth, beauty and wisdom will come to you that way. -Christopher Hitchens ---------------------------------------------------------------------------------------------------------------------------