From: Felipe Contreras <felipe.contreras@gmail.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: "SZEDER Gábor" <szeder@ira.uka.de>,
git@vger.kernel.org, "Jonathan Nieder" <jrnieder@gmail.com>,
"Junio C Hamano" <gitster@pobox.com>,
"Thomas Rast" <trast@student.ethz.ch>,
"Jeff King" <peff@peff.net>
Subject: Re: [PATCH v2 1/2] tests: move code to run completion tests under bash into a helper library
Date: Tue, 17 Apr 2012 10:37:18 +0300 [thread overview]
Message-ID: <CAMP44s2isAvmEhaTJpg8qsT967ghkvjyU1OAnTLMZSb5MSsnXw@mail.gmail.com> (raw)
In-Reply-To: <4F8D19B8.1040004@viscovery.net>
2012/4/17 Johannes Sixt <j.sixt@viscovery.net>:
> 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
prev parent reply other threads:[~2012-04-17 7:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-15 20:31 [PATCH] tests: add tests for the bash prompt functions in the completion script SZEDER Gábor
2012-04-15 20:56 ` Felipe Contreras
2012-04-16 9:49 ` SZEDER Gábor
2012-04-16 10:04 ` Felipe Contreras
2012-04-16 10:20 ` SZEDER Gábor
2012-04-16 16:01 ` Jonathan Nieder
2012-04-16 22:09 ` [PATCH v2 1/2] tests: move code to run completion tests under bash into a helper library SZEDER Gábor
2012-04-16 22:09 ` [PATCH v2 2/2] tests: add tests for the bash prompt functions in the completion script SZEDER Gábor
2012-04-16 23:50 ` Jonathan Nieder
2012-04-17 0:33 ` SZEDER Gábor
2012-04-16 23:49 ` [PATCH v2 1/2] tests: move code to run completion tests under bash into a helper library Jonathan Nieder
2012-04-17 0:42 ` SZEDER Gábor
2012-04-17 7:20 ` Johannes Sixt
2012-04-17 7:37 ` Felipe Contreras [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMP44s2isAvmEhaTJpg8qsT967ghkvjyU1OAnTLMZSb5MSsnXw@mail.gmail.com \
--to=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
--cc=jrnieder@gmail.com \
--cc=peff@peff.net \
--cc=szeder@ira.uka.de \
--cc=trast@student.ethz.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).