Re: [PATCH v2 1/2] tests: move code to run completion tests under bash into a helper library

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


2012/4/17 Johannes Sixt <j.sixt@xxxxxxxxxxxxx>:
> Am 4/17/2012 0:09, schrieb SZEDER Gábor:
>> diff --git a/t/lib-completion.sh b/t/lib-completion.sh
>> new file mode 100644
>> index 00000000..3d85feb2
>> --- /dev/null
>> +++ b/t/lib-completion.sh
>> @@ -0,0 +1,17 @@
>> +#!/bin/sh
>> +#
>> +# Ensures that tests of the completion script are run under Bash.
>> +
>> +if test -n "$BASH" && test -z "$POSIXLY_CORRECT"; then
>> +     # we are in full-on bash mode
>> +     true
>> +elif type bash >/dev/null 2>&1; then
>> +     # execute in full-on bash mode
>> +     unset POSIXLY_CORRECT
>> +     exec bash "$0" "$@"
>> +else
>> +     echo '1..0 #SKIP skipping bash completion tests; bash not available'
>> +     exit 0
>> +fi
>
> I wonder what this 'echo...;exit' is about (I do so since I saw it the
> first time when Felipe submitted his patch). Shouldn't it be more like:
>
>        skip_all='skipping bash completion tests; bash not available'
>        test_done

It should, if the test library was loaded at that point, but it isn't.
BTW, I didn't write that code.

In any case, what the user sees is exactly the same, except without color.

Cheers.

-- 
Felipe Contreras
--
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


[Newbies FAQ]     [Linux Kernel Development]     [Free Online Dating]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Free Online Dating]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]     [Linux Resources]

Add to Google