Re: [PATCH] Avoid difference in tr semantics between System V and BSD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 28, 2013 at 9:04 PM, Ben Walton <bdwalton@xxxxxxxxx> wrote:
> 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@xxxxxxxxx> wrote:
>> Jonathan Nieder <jrnieder@xxxxxxxxx> 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@xxxxxxxxx>
>>>
>>> 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.
>>

Per the other discussion about replacing all PERL_PATH with a shell
function named perl, should I update this patch to use $PERL_PATH in
the meantime so that it can be batch updated when the function is
added in a separate patch?

Thanks
-Ben
-- 
---------------------------------------------------------------------------------------------------------------------------
Take the risk of thinking for yourself.  Much more happiness,
truth, beauty and wisdom will come to you that way.

-Christopher Hitchens
---------------------------------------------------------------------------------------------------------------------------
--
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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]