Re: [PATCH 01/12] tests: add initial bash completion tests
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Apr 11, 2012, 21:59 UTC
- Message-ID
- <CAMP44s2EunUabZdU23e+jYnBrWtBmhZeqt9yR+wV3X9HZhd7hA@mail.gmail.com>
- In-Reply-To
- <7vpqbiyhmu.fsf@alter.siamese.dyndns.org>
On Sun, Apr 8, 2012 at 7:25 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 30 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes: > >> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> >> --- >> t/t9902-completion.sh | 201 +++++++++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 201 insertions(+) >> create mode 100755 t/t9902-completion.sh >> >> diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh >> new file mode 100755 >> index 0000000..7eb80dd >> --- /dev/null >> +++ b/t/t9902-completion.sh >> @@ -0,0 +1,201 @@ >> +#!/bin/sh >> +# >> +# Copyright (c) 2012 Felipe Contreras >> +# >> + >> +if type bash >/dev/null 2>&1 >> +then >> + # execute inside bash >> + test -z "$BASH" && exec bash "$0" "$@" >> +else >> + echo '1..0 #SKIP skipping bash completion tests; bash not available' >> + exit 0 >> +fi > > What shell do you use on your system as /bin/sh (or if you use SHELL_PATH > in the Makefile to override it, what do you use)?
/bin/sh is a symlink to bash on my system, and although bash defines POSIXLY_CORRECT, the tests pass just fine. I even tried to run /bin/sh --posix.
-- Felipe Contreras