Jonathan Nieder | c74c720 | 2013-11-25 13:03:06 -0800 | [diff] [blame] | 1 | # Shell library sourced instead of ./test-lib.sh by tests that need |
| 2 | # to run under Bash; primarily intended for tests of the completion |
| 3 | # script. |
SZEDER Gábor | f8891cf | 2012-05-09 02:44:32 +0200 | [diff] [blame] | 4 | |
Denton Liu | df6d3d6 | 2019-11-20 16:45:48 -0800 | [diff] [blame] | 5 | if test -n "$BASH" && test -z "$POSIXLY_CORRECT" |
| 6 | then |
SZEDER Gábor | f8891cf | 2012-05-09 02:44:32 +0200 | [diff] [blame] | 7 | # we are in full-on bash mode |
| 8 | true |
Denton Liu | df6d3d6 | 2019-11-20 16:45:48 -0800 | [diff] [blame] | 9 | elif type bash >/dev/null 2>&1 |
| 10 | then |
SZEDER Gábor | f8891cf | 2012-05-09 02:44:32 +0200 | [diff] [blame] | 11 | # execute in full-on bash mode |
| 12 | unset POSIXLY_CORRECT |
| 13 | exec bash "$0" "$@" |
| 14 | else |
| 15 | echo '1..0 #SKIP skipping bash completion tests; bash not available' |
| 16 | exit 0 |
| 17 | fi |
| 18 | |
| 19 | . ./test-lib.sh |