(command.CommandList children: [ (command.Simple blame_tok: <Id.Lit_Colon ':'> more_env: [] words: [ {<Id.Lit_Colon ':'>} { (BracedVarSub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_Name TEST_SH> var_name: TEST_SH suffix_op: (suffix_op.Unary op:<Id.VTest_ColonEquals _> arg_word:{(DQ <'/bin/sh'>)}) right: <Id.Right_DollarBrace '}'> ) } ] redirects: [] do_fork: T ) (command.ShFunction name_tok: <test_option_on_off> name: test_option_on_off body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_require_prog> more_env: [] words: [{<atf_require_prog>} {<tr>}] redirects: [] do_fork: T ) (command.ForEach keyword: <Id.KW_For for> iter_names: [opt] iterable: (for_iter__Args) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-z>} {(DQ (${ Id.VSub_Name opt))}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Continue continue> ) ] ops: [<Id.Op_DAmp _>] ) (command.ShAssignment left: <Id.Lit_VarLike 'CLEAR='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'CLEAR='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'CLEAR='> name:CLEAR) op: assign_op.Equal rhs: {(SQ )} ) ] redirects: [] ) (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [ {<test>} { (DQ (BracedVarSub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_Name opt> var_name: opt prefix_op: <Id.VSub_Pound '#'> right: <Id.Right_DollarBrace '}'> ) ) } {<-gt>} {<1>} ] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'CLEAR='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'CLEAR='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'CLEAR='> name:CLEAR) op: assign_op.Equal rhs: { (SQ < 'xx="$-" && xx=$(echo "$xx" | tr -d cs) && test -n "$xx" && set +"$xx";' > ) } ) ] redirects: [] ) ] ops: [<Id.Op_DAmp _>] ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<empty>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} {(DQ <'opt='> (${ Id.VSub_Name opt)) (SQ <'\n'> <'\t\t\tx() {\n'> <'\t\t\t\techo "ERROR: Unable to $1 option $2" >&2\n'> <'\t\t\t\texit 1\n'> <'\t\t\t}\n'> <'\t\t\ts() {\n'> <'\t\t\t\tset -"$1"\n'> <'\t\t\t\tt="$-"\n'> <'\t\t\t\tx=$(echo "$t" | tr -d "$1")\n'> <'\t\t\t\ttest "$t" = "$x" && x set "$1"\n'> <'\t\t\t\treturn 0\n'> <'\t\t\t}\n'> <'\t\t\tc() {\n'> <'\t\t\t\tset +"$1"\n'> <'\t\t\t\tt="$-"\n'> <'\t\t\t\tx=$(echo "$t" | tr -d "$1")\n'> <'\t\t\t\ttest "$t" != "$x" && x clear "$1"\n'> <'\t\t\t\treturn 0\n'> <'\t\t\t}\n'> <'\t\t\t'> ) (DQ (${ Id.VSub_Name CLEAR)) (SQ <'\n'> <'\n'> <'\t\t\t# if we do not do this, -x tracing splatters stderr\n'> <'\t\t\t# for some shells, -v does as well (is that correct?)\n'> <'\t\t\tcase "${opt}" in\n'> <'\t\t\t(*[xv]*)\texec 2>/dev/null;;\n'> <'\t\t\tesac\n'> <'\n'> <'\t\t\to="$-"\n'> <'\t\t\tx=$(echo "$o" | tr -d "$opt")\n'> <'\n'> <'\t\t\tif [ "$o" = "$x" ]; then\t# option was off\n'> <'\t\t\t\ts "${opt}"\n'> <'\t\t\t\tc "${opt}"\n'> <'\t\t\telse\n'> <'\t\t\t\tc "${opt}"\n'> <'\t\t\t\ts "${opt}"\n'> <'\t\t\tfi\n'> <'\t\t'> ) } ] redirects: [] do_fork: T ) ] right: <Id.KW_Done done> ) redirects: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <test_optional_on_off> name: test_optional_on_off body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment left: <Id.Lit_VarLike 'RET='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'RET='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'RET='> name:RET) op: assign_op.Equal rhs: {<0>} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'OPTS='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'OPTS='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'OPTS='> name:OPTS) op: assign_op.Equal rhs: (rhs_word__Empty) ) ] redirects: [] ) (command.ForEach keyword: <Id.KW_For for> iter_names: [opt] iterable: (for_iter__Args) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {(DQ (${ Id.VSub_Name opt))} {<Id.Lit_Equals '='>} {<n>}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Continue continue> ) ] ops: [<Id.Op_DAmp _>] ) (command.AndOr children: [ (command.Simple blame_tok: <Id.Left_DollarBrace '${'> more_env: [] words: [ {(${ Id.VSub_Name TEST_SH)} {<-c>} {(DQ <'set -'> (${ Id.VSub_Name opt))} ] redirects: [ (Redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'OPTS='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'OPTS='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'OPTS='> name:OPTS) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name OPTS) <' '> (${ Id.VSub_Name opt))} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'RET='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'RET='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'RET='> name:RET) op: assign_op.Equal rhs: {<1>} ) ] redirects: [] ) ] ops: [<Id.Op_DAmp _> <Id.Op_DPipe _>] ) ] right: <Id.KW_Done done> ) redirects: [] ) (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-n>} {(DQ (${ Id.VSub_Name OPTS))}] redirects: [] do_fork: T ) (command.Simple blame_tok: <test_option_on_off> more_env: [] words: [{<test_option_on_off>} {(${ Id.VSub_Name OPTS)}] redirects: [] do_fork: T ) ] ops: [<Id.Op_DAmp _>] ) (command.ControlFlow keyword: <Id.ControlFlow_Return return> arg_word: {(DQ (${ Id.VSub_Name RET))} ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Simple blame_tok: <atf_test_case> more_env: [] words: [{<atf_test_case>} {<set_a>}] redirects: [] do_fork: T ) (command.ShFunction name_tok: <set_a_head> name: set_a_head body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_set> more_env: [] words: [ {<atf_set>} {(DQ <descr>)} {(DQ <'Tests that \'set -a\' turns on all var export '>)} {(DQ <'and that it behaves as defined by the standard'>)} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <set_a_body> name: set_a_body body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_require_prog> more_env: [] words: [{<atf_require_prog>} {<env>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_require_prog> more_env: [] words: [{<atf_require_prog>} {<grep>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <test_option_on_off> more_env: [] words: [{<test_option_on_off>} {<a>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <1>} {<-o>} {<empty>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-ce>} {(SQ <'unset VAR; set +a; VAR=value; env | grep "^VAR="'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <Id.Lit_VarLike 'VAR='> <value>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-ce>} {(SQ <'unset VAR; set -a; VAR=value; env | grep "^VAR="'>)} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Simple blame_tok: <atf_test_case> more_env: [] words: [{<atf_test_case>} {<set_C>}] redirects: [] do_fork: T ) (command.ShFunction name_tok: <set_C_head> name: set_C_head body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_set> more_env: [] words: [ {<atf_set>} {(DQ <descr>)} {(DQ <'Tests that \'set -C\' turns on no clobber mode '>)} {(DQ <'and that it behaves as defined by the standard'>)} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <set_C_body> name: set_C_body body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_require_prog> more_env: [] words: [{<atf_require_prog>} {<ls>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <test_option_on_off> more_env: [] words: [{<test_option_on_off>} {<C>}] redirects: [] do_fork: T ) (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [ {<test>} {<-z>} { (DQ (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <ls> more_env: [] words: [{<ls>}] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) ) } ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_skip> more_env: [] words: [{<atf_skip>} {(DQ <'Test execution directory not clean'>)}] redirects: [] do_fork: T ) ] ops: [<Id.Op_DPipe _>] ) (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-c>} {(DQ <'/dev/null'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_skip> more_env: [] words: [{<atf_skip>} {(DQ <'Problem with /dev/null'>)}] redirects: [] do_fork: T ) ] ops: [<Id.Op_DPipe _>] ) (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {<Dummy_Content>}] redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<Junk_File>})] do_fork: T ) (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {<Precious_Content>}] redirects: [ (Redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<Important_File>} ) ] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<empty>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} { (SQ <'\n'> <'\t\tD=$(ls -l Junk_File) || exit 1\n'> <'\t\tset +C\n'> <'\t\techo "Overwrite it now" > Junk_File\n'> <'\t\tA=$(ls -l Junk_File) || exit 1\n'> <'\t\ttest "${A}" != "${D}"\n'> <'\t\t'> ) } ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<empty>} {<-e>} {<not-empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} { (SQ <'\n'> <'\t\tD=$(ls -l Important_File) || exit 1\n'> <'\t\tset -C\n'> <'\t\techo "Fail to Overwrite it now" > Important_File\n'> <'\t\tA=$(ls -l Important_File) || exit 1\n'> <'\t\ttest "${A}" = "${D}"\n'> <'\t\t'> ) } ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<empty>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} { (SQ <'\n'> <'\t\tD=$(ls -l Junk_File) || exit 1\n'> <'\t\tset -C\n'> <'\t\techo "Append to it now" >> Junk_File\n'> <'\t\tA=$(ls -l Junk_File) || exit 1\n'> <'\t\ttest "${A}" != "${D}"\n'> <'\t\t'> ) } ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<empty>} {<-e>} {<not-empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} { (SQ <'\n'> <'\t\tset -Ce\n'> <'\t\techo "Fail to Overwrite it now" > Important_File\n'> <'\t\techo "Should not reach this point"\n'> <'\t\t'> ) } ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<empty>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} { (SQ <'\n'> <'\t\tD=$(ls -l Junk_File) || exit 1\n'> <'\t\tset -C\n'> <'\t\techo "Change the poor bugger again" >| Junk_File\n'> <'\t\tA=$(ls -l Junk_File) || exit 1\n'> <'\t\ttest "${A}" != "${D}"\n'> <'\t\t'> ) } ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Simple blame_tok: <atf_test_case> more_env: [] words: [{<atf_test_case>} {<set_e>}] redirects: [] do_fork: T ) (command.ShFunction name_tok: <set_e_head> name: set_e_head body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_set> more_env: [] words: [ {<atf_set>} {(DQ <descr>)} {(DQ <'Tests that \'set -e\' turns on error detection '>)} {(DQ <'and that a simple case behaves as defined by the standard'>)} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <set_e_body> name: set_e_body body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <test_option_on_off> more_env: [] words: [{<test_option_on_off>} {<e>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <I_am_OK>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} {(SQ <'false; printf "%s" I_am; set -e; true; printf "%s\\n" _OK'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <I_am>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <Broken>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} {(SQ <'false; printf "%s" I_am; set -e; false; printf "%s\\n" _Broken'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <I_am>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <Broken>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-ec>} {(SQ <'printf "%s" I_am; false; printf "%s\\n" _Broken'>)} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Simple blame_tok: <atf_test_case> more_env: [] words: [{<atf_test_case>} {<set_f>}] redirects: [] do_fork: T ) (command.ShFunction name_tok: <set_f_head> name: set_f_head body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_set> more_env: [] words: [ {<atf_set>} {(DQ <descr>)} {(DQ <'Tests that \'set -f\' turns off pathname expansion '>)} {(DQ <'and that it behaves as defined by the standard'>)} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <set_f_body> name: set_f_body body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_require_prog> more_env: [] words: [{<atf_require_prog>} {<ls>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <test_option_on_off> more_env: [] words: [{<test_option_on_off>} {<f>}] redirects: [] do_fork: T ) (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [ {<test>} {<-z>} { (DQ (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <ls> more_env: [] words: [{<ls>}] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) ) } ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_skip> more_env: [] words: [{<atf_skip>} {(DQ <'Test execution directory not clean'>)}] redirects: [] do_fork: T ) ] ops: [<Id.Op_DPipe _>] ) (command.ForEach keyword: <Id.KW_For for> iter_names: [f] iterable: (for_iter.Words words: [ {<a>} {<b>} {<c>} {<d>} {<e>} {<f>} {<aa>} {<ab>} {<ac>} {<ad>} {<ae>} {<aaa>} {<aab>} {<aac>} {<aad>} {<aba>} {<abc>} {<bbb>} {<ccc>} ] ) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ ($ Id.VSub_DollarName f))}] redirects: [ (Redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_DollarName f))} ) ] do_fork: T ) ] right: <Id.KW_Done done> ) redirects: [] ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<empty>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-ec>} { (SQ <'X=$(echo b*); Y=$(echo b*); test "${X}" != "a*";\n'> <'\t\ttest "${X}" = "${Y}"'> ) } ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<empty>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-ec>} {(SQ <'X=$(echo b*); Y=$(set -f; echo b*); test "${X}" != "${Y}"'>)} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Simple blame_tok: <atf_test_case> more_env: [] words: [{<atf_test_case>} {<set_n>}] redirects: [] do_fork: T ) (command.ShFunction name_tok: <set_n_head> name: set_n_head body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_set> more_env: [] words: [ {<atf_set>} {(DQ <descr>)} {(DQ <'Tests that \'set -n\' supresses command execution '>)} {(DQ <'and that it behaves as defined by the standard'>)} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <set_n_body> name: set_n_body body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<empty>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-enc>} {(SQ <'echo ABANDON HOPE; echo ALL YE; echo ...'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<empty>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-enc>} {(SQ <'ERR; FAIL; ABANDON HOPE'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<empty>} {<-e>} {<not-empty>} {(${ Id.VSub_Name TEST_SH)} {<-enc>} {(SQ <'echo JUMP; for frogs swim; echo in puddles'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<empty>} {<-e>} {<not-empty>} {(${ Id.VSub_Name TEST_SH)} {<-nc>} {(SQ <'echo ABANDON HOPE; echo "ALL YE; echo ...'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<empty>} {<-e>} {<not-empty>} {(${ Id.VSub_Name TEST_SH)} {<-enc>} {(SQ <'echo ABANDON HOPE;; echo ALL YE; echo ...'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<empty>} {<-e>} {<not-empty>} {(${ Id.VSub_Name TEST_SH)} {<-nc>} {(SQ <'do YOU ABANDON HOPE; for all eternity?'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <first>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <second>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} {(SQ <'echo first; set -n; echo second'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <first>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <third>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} {(SQ <'echo first; set -n; echo second; set +n; echo third'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<inline> <Id.Lit_Colon ':'> (SQ <'a\\nb\\n'>)} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} { (SQ <'for x in a b c d\n'> <'\t\t\t do\n'> <'\t\t\t\tcase "$x" in\n'> <'\t\t\t\t a);; b);; c) set -n;; d);;\n'> <'\t\t\t\tesac\n'> <'\t\t\t\tprintf "%s\\n" "$x"\n'> <'\t\t\t done'> ) } ] redirects: [] do_fork: T ) (command.Subshell left: <Id.Op_LParen _> child: (command.CommandList children: [ (command.Sentence child: (command.Simple blame_tok: <sleep> more_env: [] words: [{<sleep>} {<10>}] redirects: [] do_fork: T ) terminator: <Id.Op_Amp _> ) (command.Sentence child: (command.Simple blame_tok: <sleep> more_env: [] words: [{<sleep>} {<1>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.Simple blame_tok: <kill> more_env: [] words: [{<kill>} {<-USR1>} {($ Id.VSub_Bang '!')}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.Simple blame_tok: <wait> more_env: [] words: [{<wait>} {($ Id.VSub_Bang '!')}] redirects: [] do_fork: T ) ] ) right: <Id.Right_Subshell _> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'XIT='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'XIT='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'XIT='> name:XIT) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_QMark '?'))} ) ] redirects: [] ) (command.Case case_kw: <Id.KW_Case case> to_match: (case_arg.Word w:{(DQ (${ Id.VSub_Name XIT))}) arms_start: <Id.KW_In in> arms: [ (CaseArm left: <Id.Op_LParen _> pattern: (pat.Words words: [ {<129>} {<1> <Id.Lit_LBracket '['> <3-9> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <0-9> <Id.Lit_RBracket ']'> } {<2> <Id.Lit_LBracket '['> <0-4> <Id.Lit_RBracket ']'> <Id.Lit_LBracket '['> <0-9> <Id.Lit_RBracket ']'> } {<25> <Id.Lit_LBracket '['> <0-5> <Id.Lit_RBracket ']'>} ] ) middle: <Id.Right_CasePat _> action: [ (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> (${ Id.VSub_Name XIT)} {<-o>} {<empty>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} { (SQ <'\n'> <'\t\t\ttrap "set -n" USR1\n'> <'\t\t\t{ sleep 1; kill -USR1 $$; sleep 1; } &\n'> <'\t\t\tfalse\n'> <'\t\t\twait && echo t || echo f\n'> <'\t\t\twait\n'> <'\t\t\techo foo\n'> <'\t\t'> ) } ] redirects: [] do_fork: T ) ] right: <Id.Op_DSemi _> ) ] arms_end: <Id.KW_Esac esac> redirects: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Simple blame_tok: <atf_test_case> more_env: [] words: [{<atf_test_case>} {<set_u>}] redirects: [] do_fork: T ) (command.ShFunction name_tok: <set_u_head> name: set_u_head body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_set> more_env: [] words: [ {<atf_set>} {(DQ <descr>)} {(DQ <'Tests that \'set -u\' turns on unset var detection '>)} {(DQ <'and that it behaves as defined by the standard'>)} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <set_u_body> name: set_u_body body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <test_option_on_off> more_env: [] words: [{<test_option_on_off>} {<u>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <OK>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-ce>} {(SQ <'unset _UNSET_VARIABLE_; echo OK'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <OK>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-cue>} {(SQ <'unset _UNSET_VARIABLE_; echo OK'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <OK>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-ce>} {(SQ <'unset X; echo ${X}; echo OK'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <OKOK>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-ce>} {(SQ <'unset X; printf "%s" ${X-OK}; echo OK'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <ERR>} {<-e>} {<not-empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} {(SQ <'unset X; set -u; echo ${X}; echo ERR'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <ERR>} {<-e>} {<not-empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} {(SQ <'unset X; set -u; echo "${X}"; echo ERR'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <OK>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-ce>} {(SQ <'unset X; set -u; echo ${X-GOOD}; echo OK'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <OK>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-ce>} {(SQ <'unset X; set -u; echo ${X-OK}'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <ERR>} {<-o>} {<match> <Id.Lit_Colon ':'> <OK>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-ce>} {(SQ <'unset X; set -u; echo ${X+ERR}; echo OK'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <ERR>} {<-e>} {<not-empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} {(SQ <'unset X; set -u; echo ${X#foo}; echo ERR'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <ERR>} {<-e>} {<not-empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} {(SQ <'unset X; set -u; echo ${X%%bar}; echo ERR'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <ERR>} {<-e>} {<not-empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} {(SQ <'unset X; echo ${X?}; echo ERR'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <ERR>} {<-e>} {<match> <Id.Lit_Colon ':'> <X_NOT_SET>} {(${ Id.VSub_Name TEST_SH)} {<-c>} {(SQ <'unset X; echo ${X?X_NOT_SET}; echo ERR'>)} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Simple blame_tok: <atf_test_case> more_env: [] words: [{<atf_test_case>} {<set_v>}] redirects: [] do_fork: T ) (command.ShFunction name_tok: <set_v_head> name: set_v_head body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_set> more_env: [] words: [ {<atf_set>} {(DQ <descr>)} {(DQ <'Tests that \'set -v\' turns on input read echoing '>)} {(DQ <'and that it behaves as defined by the standard'>)} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <set_v_body> name: set_v_body body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <test_option_on_off> more_env: [] words: [{<test_option_on_off>} {<v>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <OKOK>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <echo>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <printf>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-ec>} {(SQ <'printf "%s" OK; set -v; echo OK; exit 0'>)} ] redirects: [] do_fork: T ) (command.Pipeline children: [ (command.Simple blame_tok: <cat> more_env: [] words: [{<cat>}] redirects: [ (Redir op: <Id.Redir_DLessDash '<<-'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <EOF>)} here_end_tok: <Id.Undefined_Tok ''> stdin_parts: [<'set -v\n'> <'printf %s OK\n'> <'echo OK\n'> <'exit 0\n'>] ) ) ] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <OKOK>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <echo>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <printf>} {<-e>} {<match> <Id.Lit_Colon ':'> <printf>} {<-e>} {<match> <Id.Lit_Colon ':'> <OK>} {<-e>} {<match> <Id.Lit_Colon ':'> <echo>} {<-e>} {<not-match> <Id.Lit_Colon ':'> <set>} {(${ Id.VSub_Name TEST_SH)} ] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) (command.Pipeline children: [ (command.Simple blame_tok: <cat> more_env: [] words: [{<cat>}] redirects: [ (Redir op: <Id.Redir_DLessDash '<<-'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <EOF>)} here_end_tok: <Id.Undefined_Tok ''> stdin_parts: [ <'set -v\n'> <'printf %s OK\n'> <'set +v\n'> <'echo OK\n'> <'exit 0\n'> ] ) ) ] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <OKOK>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <echo>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <printf>} {<-e>} {<match> <Id.Lit_Colon ':'> <printf>} {<-e>} {<match> <Id.Lit_Colon ':'> <OK>} {<-e>} {<not-match> <Id.Lit_Colon ':'> <echo>} {(${ Id.VSub_Name TEST_SH)} ] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) (command.Pipeline children: [ (command.Simple blame_tok: <cat> more_env: [] words: [{<cat>}] redirects: [ (Redir op: <Id.Redir_DLessDash '<<-'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <EOF>)} here_end_tok: <Id.Undefined_Tok ''> stdin_parts: [ <'set -v\n'> <'for i in 111 222 333\n'> <'do\n'> <'printf %s $i\n'> <'done\n'> <'exit 0\n'> ] ) ) ] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <111222333>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <printf>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <Id.KW_For for>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <Id.KW_Do do>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <Id.KW_Done done>} {<-e>} {<match> <Id.Lit_Colon ':'> <printf>} {<-e>} {<match> <Id.Lit_Colon ':'> <111>} {<-e>} {<not-match> <Id.Lit_Colon ':'> <111222>} {<-e>} {<match> <Id.Lit_Colon ':'> <Id.KW_For for>} {<-e>} {<match> <Id.Lit_Colon ':'> <Id.KW_Do do>} {<-e>} {<match> <Id.Lit_Colon ':'> <Id.KW_Done done>} {(${ Id.VSub_Name TEST_SH)} ] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Simple blame_tok: <atf_test_case> more_env: [] words: [{<atf_test_case>} {<set_x>}] redirects: [] do_fork: T ) (command.ShFunction name_tok: <set_x_head> name: set_x_head body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_set> more_env: [] words: [ {<atf_set>} {(DQ <descr>)} {(DQ <'Tests that \'set -x\' turns on command exec logging '>)} {(DQ <'and that it behaves as defined by the standard'>)} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <set_x_body> name: set_x_body body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <test_option_on_off> more_env: [] words: [{<test_option_on_off>} {<x>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <OKOK>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <echo>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <printf>} {<-e>} {<not-match> <Id.Lit_Colon ':'> <printf>} {<-e>} {<match> <Id.Lit_Colon ':'> <OK>} {<-e>} {<match> <Id.Lit_Colon ':'> <echo>} {(${ Id.VSub_Name TEST_SH)} {<-ec>} {(SQ <'printf "%s" OK; set -x; echo OK; exit 0'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <OKOK>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <echo>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <printf>} {<-e>} {<match> <Id.Lit_Colon ':'> <printf>} {<-e>} {<match> <Id.Lit_Colon ':'> <OK>} {<-e>} {<not-match> <Id.Lit_Colon ':'> <echo>} {(${ Id.VSub_Name TEST_SH)} {<-ec>} {(SQ <'set -x; printf "%s" OK; set +x; echo OK; exit 0'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <OK>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <echo>} {<-e>} {<match> <Id.Lit_Colon ':'> <OK>} {<-e>} {<match> <Id.Lit_Colon ':'> <Run> <Id.Lit_Colon ':'> <echo>} {(${ Id.VSub_Name TEST_SH)} {<-ec>} {(SQ <'PS4=Run:; set -x; echo OK; exit 0'>)} ] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Return return> arg_word:{<0>}) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <111222333>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <printf>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <Id.KW_For for>} {<-e>} {<match> <Id.Lit_Colon ':'> <printf>} {<-e>} {<match> <Id.Lit_Colon ':'> <111>} {<-e>} {<not-match> <Id.Lit_Colon ':'> <111222>} {<-e>} {<not-match> <Id.Lit_Colon ':'> <Id.KW_For for>} {<-e>} {<not-match> <Id.Lit_Colon ':'> <Id.KW_Do do>} {<-e>} {<not-match> <Id.Lit_Colon ':'> <Id.KW_Done done>} {(${ Id.VSub_Name TEST_SH)} {<-ec>} {(SQ <'set -x; for i in 111 222 333; do printf "%s" $i; done; echo; exit 0'>)} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <opt_test_setup> name: opt_test_setup body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-n>} {(DQ ($ Id.VSub_Number 1))}] redirects: [] do_fork: T ) (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Sentence child: (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'Internal error'>)}] redirects: [ (Redir op: <Id.Redir_GreatAnd '>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) terminator: <Id.Op_Semi _> ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ] ops: [<Id.Op_DPipe _>] ) (command.Simple blame_tok: <cat> more_env: [] words: [{<cat>}] redirects: [ (Redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_Number 1))} ) (Redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <END_OF_FUNCTIONS>)} here_end_tok: <Id.Undefined_Tok ''> stdin_parts: [ <'local_opt_check()\n'> <'{\n'> <'\tlocal -\n'> <'}\n'> <'\n'> <'instr()\n'> <'{\n'> <'\texpr "$2" : "\\(.*$1\\)" >/dev/null\n'> <'}\n'> <'\n'> <'save_opts()\n'> <'{\n'> <'\tlocal -\n'> <'\n'> <'\tset -e\n'> <'\tset -u\n'> <'\n'> <'\tinstr e "$-" && instr u "$-" && return 0\n'> <'\techo ERR\n'> <'}\n'> <'\n'> <'fiddle_opts()\n'> <'{\n'> <'\tset -e\n'> <'\tset -u\n'> <'\n'> <'\tinstr e "$-" && instr u "$-" && return 0\n'> <'\techo ERR\n'> <'}\n'> <'\n'> <'local_test()\n'> <'{\n'> <'\tset +eu\n'> <'\n'> <'\tsave_opts\n'> <'\tinstr \'[eu]\' "$-" || printf %s "OK"\n'> <'\n'> <'\tfiddle_opts\n'> <'\tinstr e "$-" && instr u "$-" && printf %s "OK"\n'> <'\n'> <'\tset +eu\n'> <'}\n'> ] ) ) ] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Simple blame_tok: <atf_test_case> more_env: [] words: [{<atf_test_case>} {<restore_local_opts>}] redirects: [] do_fork: T ) (command.ShFunction name_tok: <restore_local_opts_head> name: restore_local_opts_head body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_set> more_env: [] words: [ {<atf_set>} {(DQ <descr>)} {(DQ <'Tests that \'local -\' saves and restores options. '>)} {(DQ <'Note that '>) <local> (DQ <' is a local shell addition'>)} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <restore_local_opts_body> name: restore_local_opts_body body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_require_prog> more_env: [] words: [{<atf_require_prog>} {<cat>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_require_prog> more_env: [] words: [{<atf_require_prog>} {<expr>}] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'FN='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'FN='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FN='> name:FN) op: assign_op.Equal rhs: {(DQ <test-funcs.> ($ Id.VSub_Dollar '$'))} ) ] redirects: [] ) (command.AndOr children: [ (command.Simple blame_tok: <opt_test_setup> more_env: [] words: [{<opt_test_setup>} {(DQ (${ Id.VSub_Name FN))}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_skip> more_env: [] words: [{<atf_skip>} {(DQ <'Cannot setup test environment'>)}] redirects: [] do_fork: T ) ] ops: [<Id.Op_DPipe _>] ) (command.AndOr children: [ (command.Simple blame_tok: <Id.Left_DollarBrace '${'> more_env: [] words: [ {(${ Id.VSub_Name TEST_SH)} {<-ec>} {(DQ <'. \'./'> (${ Id.VSub_Name FN) <'\'; local_opt_check'>)} ] redirects: [ (Redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple blame_tok: <atf_skip> more_env: [] words: [ {<atf_skip>} {(DQ <'sh extension \'local -\' not supported by '> (${ Id.VSub_Name TEST_SH))} ] redirects: [] do_fork: T ) ] ops: [<Id.Op_DPipe _>] ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<match> <Id.Lit_Colon ':'> <OKOK>} {<-o>} {<not-match> <Id.Lit_Colon ':'> <ERR>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-ec>} {(DQ <'. \'./'> (${ Id.VSub_Name FN) <'\'; local_test'>)} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Simple blame_tok: <atf_test_case> more_env: [] words: [{<atf_test_case>} {<vi_emacs_VE_toggle>}] redirects: [] do_fork: T ) (command.ShFunction name_tok: <vi_emacs_VE_toggle_head> name: vi_emacs_VE_toggle_head body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_set> more_env: [] words: [ {<atf_set>} {(DQ <descr>)} {(DQ <'Tests enabling vi disables emacs (and v.v - but why?)'>)} {(DQ <' Note that -V and -E are local shell additions'>)} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <vi_emacs_VE_toggle_body> name: vi_emacs_VE_toggle_body body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.AndOr children: [ (command.Simple blame_tok: <test_optional_on_off> more_env: [] words: [{<test_optional_on_off>} {<V>} {<E>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_skip> more_env: [] words: [ {<atf_skip>} {(DQ <'One or both V & E opts unsupported by '> (${ Id.VSub_Name TEST_SH))} ] redirects: [] do_fork: T ) ] ops: [<Id.Op_DPipe _>] ) (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<Id.ControlFlow_Exit exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<empty>} {<-e>} {<empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} { (SQ <'\n'> <'\t\tq() {\n'> <'\t\t\teval "case \\"$-\\" in\n'> <'\t\t\t(*${2}*)\treturn 1;;\n'> <'\t\t\t(*${1}*)\treturn 0;;\n'> <'\t\t\tesac"\n'> <'\t\t\treturn 1\n'> <'\t\t}\n'> <'\t\tx() {\n'> <'\t\t\techo >&2 "Option set or toggle failure:" \\\n'> <'\t\t\t\t\t" on=$1 off=$2 set=$-"\n'> <'\t\t\texit 1\n'> <'\t\t}\n'> <'\t\tset -V; q V E || x V E\n'> <'\t\tset -E; q E V || x E V\n'> <'\t\tset -V; q V E || x V E\n'> <'\t\tset +EV; q "" "[VE]" || x "" VE\n'> <'\t\texit 0\n'> <'\t'> ) } ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Simple blame_tok: <atf_test_case> more_env: [] words: [{<atf_test_case>} {<xx_bogus>}] redirects: [] do_fork: T ) (command.ShFunction name_tok: <xx_bogus_head> name: xx_bogus_head body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_set> more_env: [] words: [ {<atf_set>} {(DQ <descr>)} {(DQ <'Tests that attempting to set a nonsense option fails.'>)} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <xx_bogus_body> name: xx_bogus_body body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_check> more_env: [] words: [ {<atf_check>} {<-s>} {<not-exit> <Id.Lit_Colon ':'> <0>} {<-o>} {<empty>} {<-e>} {<not-empty>} {(${ Id.VSub_Name TEST_SH)} {<-c>} {(SQ <'set -% ; echo ERR'>)} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Simple blame_tok: <atf_test_case> more_env: [] words: [{<atf_test_case>} {<Option_switching>}] redirects: [] do_fork: T ) (command.ShFunction name_tok: <Option_switching_head> name: Option_switching_head body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_set> more_env: [] words: [{<atf_set>} {(DQ <descr>)} {(DQ <'options can be enabled and disabled'>)}] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <Option_switching_body> name: Option_switching_body body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <test_option_on_off> more_env: [] words: [{<test_option_on_off>} {<a>} {<b>} {<C>} {<e>} {<f>} {<h>} {<u>} {<v>} {<x>}] redirects: [] do_fork: T ) (command.AndOr children: [ (command.Simple blame_tok: <test_optional_on_off> more_env: [] words: [{<test_optional_on_off>} {<E>} {<i>} {<I>} {<p>} {<q>} {<V>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <true> more_env: [] words: [{<true>}] redirects: [] do_fork: T ) ] ops: [<Id.Op_DPipe _>] ) (command.Simple blame_tok: <test_option_on_off> more_env: [] words: [{<test_option_on_off>} {<aeu>} {<vx>} {<Ca>} {<aCefux>}] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <atf_init_test_cases> name: atf_init_test_cases body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <atf_add_test_case> more_env: [] words: [{<atf_add_test_case>} {<Option_switching>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_add_test_case> more_env: [] words: [{<atf_add_test_case>} {<restore_local_opts>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_add_test_case> more_env: [] words: [{<atf_add_test_case>} {<set_a>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_add_test_case> more_env: [] words: [{<atf_add_test_case>} {<set_C>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_add_test_case> more_env: [] words: [{<atf_add_test_case>} {<set_e>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_add_test_case> more_env: [] words: [{<atf_add_test_case>} {<set_f>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_add_test_case> more_env: [] words: [{<atf_add_test_case>} {<set_n>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_add_test_case> more_env: [] words: [{<atf_add_test_case>} {<set_u>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_add_test_case> more_env: [] words: [{<atf_add_test_case>} {<set_v>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_add_test_case> more_env: [] words: [{<atf_add_test_case>} {<set_x>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_add_test_case> more_env: [] words: [{<atf_add_test_case>} {<vi_emacs_VE_toggle>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <atf_add_test_case> more_env: [] words: [{<atf_add_test_case>} {<xx_bogus>}] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) ] )