# Shell library sourced instead of ./test-lib.sh by tests that need # to run under Bash; primarily intended for tests of the completion # script. if test -n $BASH && test -z $POSIXLY_CORRECT { # we are in full-on bash mode true } elif type bash >/dev/null !2 > !1 { # execute in full-on bash mode unset POSIXLY_CORRECT exec bash $0 @Argv } else { echo '1..0 #SKIP skipping bash completion tests; bash not available' exit 0 } source ./test-lib.sh (CommandList children: [ (If arms: [ (if_arm cond: [ (Sentence child: (AndOr children: [ (C {(test)} {(-n)} {(DQ ($ VSub_Name "$BASH"))}) (C {(test)} {(-z)} {(DQ ($ VSub_Name "$POSIXLY_CORRECT"))}) ] op_id: Op_DAmp ) terminator: ) ] action: [(C {(true)})] spids: [-1 31] ) (if_arm cond: [ (Sentence child: (SimpleCommand words: [{(type)} {(bash)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/dev/null)} spids: [46] ) (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[49]) ] ) terminator: ) ] action: [ (C {(unset)} {(POSIXLY_CORRECT)}) (C {(exec)} {(bash)} {(DQ ($ VSub_Number "$0"))} {(DQ ($ VSub_At "$@"))}) ] spids: [40 53] ) ] else_action: [ (C {(echo)} {(SQ <"1..0 #SKIP skipping bash completion tests; bash not available">)}) (C {(exit)} {(0)}) ] spids: [77 91] ) (C {(.)} {(./test-lib.sh)}) ] )