From: Felipe Contreras Date: Wed, 11 Apr 2012 21:59:38 GMT Subject: Re: [PATCH 01/12] tests: add initial bash completion tests Message-ID: In-Reply-To: <7vpqbiyhmu.fsf@alter.siamese.dyndns.org> On Sun, Apr 8, 2012 at 7:25 AM, Junio C Hamano wrote: > Felipe Contreras writes: > >> Signed-off-by: Felipe Contreras >> --- >>  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