(CommandList children: [ (FuncDef name: source_bad_syntax body: (BraceGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(_tmp/bad-syntax.sh)} spids: [38] ) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ('if foo; echo ls; fi\n'))} do_expansion: True here_end: EOF was_filled: True spids: [41] ) ] ) (C {(.)} {(_tmp/bad-syntax.sh)}) ] spids: [33] ) spids: [29 32] ) (FuncDef name: eval_bad_syntax body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:code) op: Equal rhs: {(SQ <'if foo; echo ls; fi'>)} spids: [77] ) ] spids: [75] ) (C {(eval)} {(DQ ('echo --\n') (' ') ($ VSub_Name '$code'))}) ] spids: [72] ) spids: [68 71] ) (FuncDef name: no_such_command body: (BraceGroup children: [ (C {(set)} {(-o)} {(errexit)}) (C {(ZZZZZ)}) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [108] ) spids: [104 107] ) (FuncDef name: no_such_command_commandsub body: (BraceGroup children: [ (C {(set)} {(-o)} {(errexit)}) (C {(echo)} { (CommandSubPart command_list: (CommandList children:[(C {(ZZZZZ)})]) left_token: <Left_CommandSub '$('> spids: [147 149] ) } ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [135] ) spids: [131 134] ) (FuncDef name: no_such_command_heredoc body: (BraceGroup children: [ (C {(set)} {(-o)} {(errexit)}) (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ('one\n') (CommandSubPart command_list: (CommandList children:[(C {(ZZZZZ)})]) left_token: <Left_CommandSub '$('> spids: [194 196] ) ('\n') ('three\n') ) } do_expansion: True here_end: EOF was_filled: True spids: [190] ) ] ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [165] ) spids: [161 164] ) (FuncDef name: failed_command body: (BraceGroup children: [ (C {(set)} {(-o)} {(errexit)}) (C {(false)}) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [213] ) spids: [209 212] ) (FuncDef name: pipefail body: (BraceGroup children: [ (Pipeline children:[(C {(false)})(C {(wc)} {(-l)})] negated:False) (C {(set)} {(-o)} {(errexit)}) (C {(set)} {(-o)} {(pipefail)}) (Pipeline children:[(C {(false)})(C {(wc)} {(-l)})] negated:False) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [240] ) spids: [236 239] ) (FuncDef name: pipefail_func body: (BraceGroup children: [ (C {(set)} {(-o)} {(errexit)} {(-o)} {(pipefail)}) (FuncDef name: f body: (BraceGroup children: [(C {(cat)}) (ControlFlow token:<ControlFlow_Return return> arg_word:{(42)})] spids: [308] ) spids: [304 307] ) (Pipeline children:[(C {(echo)} {(hi)})(C {(f)})(C {(wc)})] negated:False) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [290] ) spids: [286 289] ) (FuncDef name: pipefail_group body: (BraceGroup children: [ (C {(set)} {(-o)} {(errexit)} {(-o)} {(pipefail)}) (Pipeline children: [ (C {(echo)} {(hi)}) (BraceGroup children: [ (Sentence child:(C {(cat)}) terminator:<Op_Semi ';'>) (Sentence child: (C {(sh)} {(-c)} {(SQ <'exit 42'>)}) terminator: <Op_Semi ';'> ) ] spids: [383] ) (C {(wc)}) ] negated: False ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [363] ) spids: [359 362] ) (FuncDef name: pipefail_subshell body: (BraceGroup children: [ (C {(set)} {(-o)} {(errexit)} {(-o)} {(pipefail)}) (Pipeline children: [ (C {(echo)} {(hi)}) (Subshell child: (CommandList children: [ (Sentence child:(C {(cat)}) terminator:<Op_Semi ';'>) (C {(sh)} {(-c)} {(SQ <'exit 42'>)}) ] ) spids: [441 452] ) (C {(wc)}) ] negated: False ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [421] ) spids: [417 420] ) (FuncDef name: pipefail_while body: (BraceGroup children: [ (C {(set)} {(-o)} {(errexit)} {(-o)} {(pipefail)}) (Pipeline children: [ (C {(seq)} {(3)}) (While cond: [(Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)] body: (DoGroup children: [ (C {(read)} {(line)}) (C {(echo)} {(X)} {($ VSub_Name '$line')} {(X)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(test)} {(DQ ($ VSub_Name '$line'))} {(Lit_Other '=')} {(2)}) terminator: <Op_Semi ';'> ) ] action: [(C {(sh)} {(-c)} {(SQ <'exit 42'>)})] spids: [-1 531] ) ] spids: [-1 543] ) ] spids: [501 546] ) ) (C {(wc)}) ] negated: False ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [476] ) spids: [472 475] ) (FuncDef name: pipefail_multiple body: (BraceGroup children: [ (C {(set)} {(-o)} {(errexit)} {(-o)} {(pipefail)}) (Pipeline children: [ (BraceGroup children: [ (Sentence child: (C {(echo)} {(SQ <four>)}) terminator: <Op_Semi ';'> ) (Sentence child: (C {(sh)} {(-c)} {(SQ <'exit 4'>)}) terminator: <Op_Semi ';'> ) ] spids: [584] ) (BraceGroup children: [ (Sentence child: (C {(echo)} {(SQ <five>)}) terminator: <Op_Semi ';'> ) (Sentence child: (C {(sh)} {(-c)} {(SQ <'exit 5'>)}) terminator: <Op_Semi ';'> ) ] spids: [607] ) (BraceGroup children: [ (Sentence child: (C {(echo)} {(SQ <six>)}) terminator: <Op_Semi ';'> ) (Sentence child: (C {(sh)} {(-c)} {(SQ <'exit 6'>)}) terminator: <Op_Semi ';'> ) ] spids: [630] ) ] negated: False ) ] spids: [570] ) spids: [566 569] ) (FuncDef name: control_flow body: (BraceGroup children: [ (ControlFlow token:<ControlFlow_Break break>) (ControlFlow token:<ControlFlow_Continue continue>) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [660] ) spids: [656 659] ) (FuncDef name: nounset body: (BraceGroup children: [ (C {(set)} {(-o)} {(nounset)}) (C {(echo)} {($ VSub_Name '$x')}) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [693] ) spids: [689 692] ) (FuncDef name: nounset_arith body: (BraceGroup children: [ (C {(set)} {(-o)} {(nounset)}) (C {(echo)} {(ArithSubPart anode:(ArithVarRef name:x) spids:[744749])}) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [732] ) spids: [728 731] ) (FuncDef name: divzero body: (BraceGroup children: [ (C {(echo)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Slash left: (ArithWord w:{(Lit_Digits 1)}) right: (ArithWord w:{(Lit_Digits 0)}) ) spids: [771 780] ) } ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [766] ) spids: [762 765] ) (FuncDef name: divzero_var body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:zero) op:Equal rhs:{(0)} spids:[802])] spids: [800] ) (C {(echo)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Slash left: (ArithWord w:{(Lit_Digits 1)}) right: (ArithVarRef name:zero) ) spids: [808 817] ) } ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [797] ) spids: [793 796] ) (FuncDef name: string_to_int_arith body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:x) op:Equal rhs:{(SQ <ZZZ>)} spids:[842])] spids: [840] ) (C {(echo)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithVarRef name:x) right: (ArithWord w:{(Lit_Digits 5)}) ) spids: [850 859] ) } ) (C {(set)} {(-o)} {(strict-arith)}) (C {(echo)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithVarRef name:x) right: (ArithWord w:{(Lit_Digits 5)}) ) spids: [873 882] ) } ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [837] ) spids: [833 836] ) (FuncDef name: string_to_hex body: (BraceGroup children: [ (C {(echo)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{(Lit_Digits 0) (Lit_ArithVarLike xGG)}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [907 917] ) } ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [902] ) spids: [898 901] ) (FuncDef name: string_to_octal body: (BraceGroup children: [ (C {(echo)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{(Lit_Digits 018)}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [942 951] ) } ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [937] ) spids: [933 936] ) (FuncDef name: string_to_intbase body: (BraceGroup children: [ (C {(echo)} { (ArithSubPart anode: (ArithWord w:{(Lit_Digits 16) (Lit_Pound '#') (Lit_ArithVarLike GG)}) spids: [976 983] ) } ) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [971] ) spids: [967 970] ) (FuncDef name: string_to_int_bool body: (BraceGroup children: [ (DBracket expr:(BoolBinary op_id:BoolBinary_eq left:{(a)} right:{(0)})) (C {(set)} {(-o)} {(strict-arith)}) (DBracket expr:(BoolBinary op_id:BoolBinary_eq left:{(a)} right:{(0)})) (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)}) ] spids: [1013] ) spids: [1009 1012] ) (FuncDef name: _run_test body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:t) op: Equal rhs: {($ VSub_Number '$1')} spids: [1075] ) ] spids: [1073] ) (C {(echo)} {(DQ (--------))}) (C {(echo)} {(DQ (' CASE: ') ($ VSub_Name '$t'))}) (Subshell child:(C {($ VSub_Name '$t')}) spids:[10991103]) (C {(echo)} {(DQ (' STATUS: ') ($ VSub_QMark '$?'))}) (C {(echo)}) ] spids: [1070] ) spids: [1066 1069] ) (FuncDef name: all body: (BraceGroup children: [ (C {(_run_test)} {(control_flow)}) (ForEach iter_name: t iter_words: [ {(no_such_command)} {(no_such_command_commandsub)} {(no_such_command_heredoc)} {(failed_command)} {(pipefail)} {(pipefail_group)} {(pipefail_subshell)} {(pipefail_func)} {(pipefail_while)} {(nonexistent)} {(nounset)} {(nounset_arith)} {(divzero)} {(divzero_var)} {(string_to_int_arith)} {(string_to_hex)} {(string_to_octal)} {(string_to_intbase)} {(string_to_int_bool)} ] do_arg_iter: False body: (DoGroup children:[(C {(_run_test)} {($ VSub_Name '$t')})] spids:[11961205]) spids: [1142 1194] ) ] spids: [1123] ) spids: [1119 1122] ) (C {(DQ ($ VSub_At '$@'))}) ] )