(CommandList children: [ (C {(set)} {(-u)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:returnF) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name TMPDIR> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(Lit_Slash /) (tmp)}) spids: [70 75] ) (/return) ) } spids: [68] ) ] spids: [68] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:stdoutF) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name TMPDIR> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(Lit_Slash /) (tmp)}) spids: [81 86] ) (/STDOUT) ) } spids: [79] ) ] spids: [79] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:stderrF) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name TMPDIR> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(Lit_Slash /) (tmp)}) spids: [92 97] ) (/STDERR) ) } spids: [90] ) ] spids: [90] ) (C {(.)} {(./shflags_test_helpers)}) (FuncDef name: testGetoptStandard body: (BraceGroup children: [ (SimpleCommand words: [{(_flags_getoptStandard)} {(SQ <-b>)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [123] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [130] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:rslt) op: Equal rhs: {($ VSub_QMark '$?')} spids: [138] ) ] spids: [138] ) (C {(assertTrue)} {(DQ ("didn't parse valid flag 'b'"))} {(${ VSub_Name rslt)}) (C {(th_showOutput)} {(${ VSub_Name rslt)} {(DQ (${ VSub_Name stdoutF))} {(DQ (${ VSub_Name stderrF))} ) (SimpleCommand words: [{(_flags_getoptStandard)} {(SQ <-x>)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [179] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [186] ) ] ) (C {(assertFalse)} {(DQ ("parsed invalid flag 'x'"))} {($ VSub_QMark '$?')}) ] spids: [114] ) spids: [110 113] ) (FuncDef name: testGetoptEnhanced body: (BraceGroup children: [ (AndOr ops: [Op_DPipe] children: [(C {(flags_getoptIsEnh)}) (ControlFlow token:<ControlFlow_Return return>)] ) (SimpleCommand words: [{(_flags_getoptEnhanced)} {(SQ <-b>)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [226] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [233] ) ] ) (C {(assertTrue)} {(DQ ("didn't parse valid flag 'b'"))} {($ VSub_QMark '$?')}) (SimpleCommand words: [{(_flags_getoptEnhanced)} {(SQ <--bool>)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [256] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [263] ) ] ) (C {(assertTrue)} {(DQ ("didn't parse valid flag 'bool'"))} {($ VSub_QMark '$?')}) (SimpleCommand words: [{(_flags_getoptEnhanced)} {(SQ <-x>)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [287] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [294] ) ] ) (C {(assertFalse)} {(DQ ("parsed invalid flag 'x'"))} {($ VSub_QMark '$?')}) (SimpleCommand words: [{(_flags_getoptEnhanced)} {(SQ <--xyz>)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [317] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [324] ) ] ) (C {(assertFalse)} {(DQ ("parsed invalid flag 'xyz'"))} {($ VSub_QMark '$?')}) ] spids: [209] ) spids: [205 208] ) (FuncDef name: testValidBoolsShort body: (BraceGroup children: [ (SimpleCommand words: [{(FLAGS)} {(-b)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [354] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [361] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r3turn) op: Equal rhs: {($ VSub_QMark '$?')} spids: [369] ) ] spids: [369] ) (C {(assertTrue)} {(DQ ('-b) FLAGS returned a non-zero result (') (${ VSub_Name r3turn) (')'))} {(${ VSub_Name r3turn)} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:value) op: Equal rhs: { (BracedVarSub token: <VSub_Name FLAGS_bool> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{}) spids: [389 392] ) } spids: [388] ) ] spids: [388] ) (C {(assertTrue)} {(DQ ('-b) boolean was not true (') (${ VSub_Name value) (').'))} {(DQ (${ VSub_Name value))} ) (C {(assertFalse)} {(SQ <'-b) expected no output to STDERR'>)} {(DQ ("[ -s '") (${ VSub_Name stderrF) ("' ]"))} ) (C {(test)} {(${ VSub_Name r3turn)} {(-eq)} {(DQ (${ VSub_Name FLAGS_TRUE))} {(-a)} {(KW_Bang '!')} {(-s)} {(DQ (${ VSub_Name stderrF))} ) (C {(th_showOutput)} {($ VSub_QMark '$?')} {(DQ (${ VSub_Name stdoutF))} {(DQ (${ VSub_Name stderrF))} ) (C {(DEFINE_boolean)} {(bool2)} {(true)} {(SQ <'2nd boolean'>)} {(B)}) (SimpleCommand words: [{(FLAGS)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [487] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [494] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r3turn) op: Equal rhs: {($ VSub_QMark '$?')} spids: [502] ) ] spids: [502] ) (C {(assertTrue)} {(DQ ('-B) FLAGS returned a non-zero result (') (${ VSub_Name r3turn) (')'))} {(${ VSub_Name r3turn)} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:value) op: Equal rhs: { (BracedVarSub token: <VSub_Name FLAGS_bool2> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{}) spids: [522 525] ) } spids: [521] ) ] spids: [521] ) (C {(assertTrue)} {(DQ ('-B) boolean was not true (') (${ VSub_Name value) (')'))} {(DQ (${ VSub_Name value))} ) (C {(assertFalse)} {(SQ <'-B) expected no output to STDERR'>)} {(DQ ("[ -s '") (${ VSub_Name stderrF) ("' ]"))} ) (C {(test)} {(${ VSub_Name r3turn)} {(-eq)} {(DQ (${ VSub_Name FLAGS_TRUE))} {(-a)} {(KW_Bang '!')} {(-s)} {(DQ (${ VSub_Name stderrF))} ) (C {(th_showOutput)} {($ VSub_QMark '$?')} {(DQ (${ VSub_Name stdoutF))} {(DQ (${ VSub_Name stderrF))} ) (SimpleCommand words: [{(FLAGS)} {(-B)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [609] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [616] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r3turn) op: Equal rhs: {($ VSub_QMark '$?')} spids: [624] ) ] spids: [624] ) (C {(assertTrue)} {(DQ ('-B) FLAGS returned a non-zero result (') (${ VSub_Name r3turn) (')'))} {(${ VSub_Name r3turn)} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:value) op: Equal rhs: { (BracedVarSub token: <VSub_Name FLAGS_bool2> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{}) spids: [644 647] ) } spids: [643] ) ] spids: [643] ) (C {(assertFalse)} {(DQ ('-B) boolean was not false (') (${ VSub_Name value) (')'))} {(DQ (${ VSub_Name value))} ) (C {(assertFalse)} {(SQ <'-B) expected no output to STDERR'>)} {(DQ ("[ -s '") (${ VSub_Name stderrF) ("' ]"))} ) (C {(test)} {(${ VSub_Name r3turn)} {(-eq)} {(DQ (${ VSub_Name FLAGS_TRUE))} {(-a)} {(KW_Bang '!')} {(-s)} {(DQ (${ VSub_Name stderrF))} ) (C {(th_showOutput)} {($ VSub_QMark '$?')} {(DQ (${ VSub_Name stdoutF))} {(DQ (${ VSub_Name stderrF))} ) ] spids: [347] ) spids: [343 346] ) (FuncDef name: testValidBoolsLong body: (BraceGroup children: [ (AndOr ops: [Op_DPipe] children: [(C {(flags_getoptIsEnh)}) (ControlFlow token:<ControlFlow_Return return>)] ) (SimpleCommand words: [{(FLAGS)} {(--nobool)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [759] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [766] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r3turn) op: Equal rhs: {($ VSub_QMark '$?')} spids: [774] ) ] spids: [774] ) (C {(assertTrue)} {(DQ ('FLAGS returned a non-zero result (') (${ VSub_Name r3turn) (')'))} {(${ VSub_Name r3turn)} ) (C {(assertFalse)} {(SQ <'--noXX flag resulted in true value.'>)} { (DQ (BracedVarSub token: <VSub_Name FLAGS_bool> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(EmptyPart)}) spids: [800 803] ) ) } ) (C {(assertFalse)} {(SQ <'expected no output to STDERR'>)} {(DQ ("[ -s '") (${ VSub_Name stderrF) ("' ]"))} ) (C {(th_showOutput)} {(${ VSub_Name r3turn)} {(DQ (${ VSub_Name stdoutF))} {(DQ (${ VSub_Name stderrF))} ) (SimpleCommand words: [{(FLAGS)} {(--bool)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [850] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [857] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r3turn) op: Equal rhs: {($ VSub_QMark '$?')} spids: [865] ) ] spids: [865] ) (C {(assertTrue)} {(DQ ('FLAGS returned a non-zero result (') (${ VSub_Name r3turn) (')'))} {(${ VSub_Name r3turn)} ) (C {(assertTrue)} {(SQ <'--XX flag resulted in false value.'>)} { (DQ (BracedVarSub token: <VSub_Name FLAGS_bool> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(EmptyPart)}) spids: [891 894] ) ) } ) (C {(assertFalse)} {(SQ <'expected no output to STDERR'>)} {(DQ ("[ -s '") (${ VSub_Name stderrF) ("' ]"))} ) (C {(th_showOutput)} {(${ VSub_Name r3turn)} {(DQ (${ VSub_Name stdoutF))} {(DQ (${ VSub_Name stderrF))} ) (SimpleCommand words: [{(FLAGS)} {(--nobool)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [941] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [948] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r3turn) op: Equal rhs: {($ VSub_QMark '$?')} spids: [956] ) ] spids: [956] ) (C {(assertTrue)} {(DQ ('FLAGS returned a non-zero result (') (${ VSub_Name r3turn) (')'))} {(${ VSub_Name r3turn)} ) (C {(assertFalse)} {(SQ <'--noXX flag resulted in true value.'>)} { (DQ (BracedVarSub token: <VSub_Name FLAGS_bool> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(EmptyPart)}) spids: [982 985] ) ) } ) (C {(assertFalse)} {(SQ <'expected no output to STDERR'>)} {(DQ ("[ -s '") (${ VSub_Name stderrF) ("' ]"))} ) (C {(th_showOutput)} {(${ VSub_Name r3turn)} {(DQ (${ VSub_Name stdoutF))} {(DQ (${ VSub_Name stderrF))} ) ] spids: [735] ) spids: [731 734] ) (FuncDef name: testValidFloats body: (BraceGroup children: [ (C {(_testValidFloats)} {(SQ <-f>)}) (AndOr ops: [Op_DPipe] children: [(C {(flags_getoptIsEnh)}) (ControlFlow token:<ControlFlow_Return return>)] ) (C {(_testValidFloats)} {(SQ <--float>)}) ] spids: [1029] ) spids: [1025 1028] ) (FuncDef name: _testValidFloats body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:flag) op: Equal rhs: {($ VSub_Number '$1')} spids: [1062] ) ] spids: [1062] ) (ForEach iter_name: value iter_words: [{(${ VSub_Name TH_FLOAT_VALID)}] do_arg_iter: F body: (DoGroup children: [ (SimpleCommand words: [{(FLAGS)} {(DQ (${ VSub_Name flag))} {(DQ (${ VSub_Name value))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [1094] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [1101] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r3turn) op: Equal rhs: {($ VSub_QMark '$?')} spids: [1109] ) ] spids: [1109] ) (C {(assertTrue)} { (DQ ('FLAGS ') (${ VSub_Name flag) (' ') (${ VSub_Name value) (' returned non-zero result (') (${ VSub_Name r3turn) (')') ) } {(${ VSub_Name r3turn)} ) (C {(assertEquals)} { (DQ ('float (') (${ VSub_Name flag) (' ') (${ VSub_Name value) (') test failed.')) } {(DQ (${ VSub_Name value))} {(DQ (${ VSub_Name FLAGS_float))} ) (C {(assertFalse)} {(SQ <'expected no output to STDERR'>)} {(DQ ("[ -s '") (${ VSub_Name stderrF) ("' ]"))} ) (C {(th_showOutput)} {(${ VSub_Name r3turn)} {(DQ (${ VSub_Name stdoutF))} {(DQ (${ VSub_Name stderrF))} ) ] spids: [1077 1203] ) spids: [1071 1075] ) ] spids: [1059] ) spids: [1055 1058] ) (FuncDef name: testInvalidFloats body: (BraceGroup children: [ (C {(_testInvalidFloats)} {(SQ <-f>)}) (AndOr ops: [Op_DPipe] children: [(C {(flags_getoptIsEnh)}) (ControlFlow token:<ControlFlow_Return return>)] ) (C {(_testInvalidFloats)} {(SQ <--float>)}) ] spids: [1212] ) spids: [1208 1211] ) (FuncDef name: _testInvalidFloats body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:flag) op: Equal rhs: {($ VSub_Number '$1')} spids: [1245] ) ] spids: [1245] ) (ForEach iter_name: value iter_words: [{(${ VSub_Name TH_FLOAT_INVALID)}] do_arg_iter: F body: (DoGroup children: [ (C {(th_clearReturn)}) (Subshell child: (CommandList children: [ (SimpleCommand words: [{(FLAGS)} {(DQ (${ VSub_Name flag))} {(DQ (${ VSub_Name value))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [1283] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [1290] ) ] ) (SimpleCommand words: [{(echo)} {($ VSub_QMark '$?')}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name returnF))} spids: [1302] ) ] ) ] ) spids: [1266 1310] ) (C {(assertFalse)} {(DQ ('FLAGS (') (${ VSub_Name value) (') returned a zero result'))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(th_queryReturn)})]) left_token: <Left_CommandSub '$('> spids: [1324 1326] ) ) } ) (C {(assertFalse)} {(SQ <'expected no output to STDOUT'>)} {(DQ ("[ -s '") (${ VSub_Name stdoutF) ("' ]"))} ) (C {(assertTrue)} {(SQ <'expected output to STDERR'>)} {(DQ ("[ -s '") (${ VSub_Name stderrF) ("' ]"))} ) ] spids: [1260 1360] ) spids: [1254 1258] ) ] spids: [1242] ) spids: [1238 1241] ) (FuncDef name: testValidIntegers body: (BraceGroup children: [ (C {(_testValidIntegers)} {(SQ <-i>)}) (AndOr ops: [Op_DPipe] children: [(C {(flags_getoptIsEnh)}) (ControlFlow token:<ControlFlow_Return return>)] ) (C {(_testValidIntegers)} {(SQ <--int>)}) ] spids: [1369] ) spids: [1365 1368] ) (FuncDef name: _testValidIntegers body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:flag) op: Equal rhs: {($ VSub_Number '$1')} spids: [1402] ) ] spids: [1402] ) (ForEach iter_name: value iter_words: [{(${ VSub_Name TH_INT_VALID)}] do_arg_iter: F body: (DoGroup children: [ (SimpleCommand words: [{(FLAGS)} {(DQ (${ VSub_Name flag))} {(DQ (${ VSub_Name value))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [1434] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [1441] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r3turn) op: Equal rhs: {($ VSub_QMark '$?')} spids: [1449] ) ] spids: [1449] ) (C {(assertTrue)} { (DQ ('FLAGS (') (${ VSub_Name value) (') returned a non-zero result (') (${ VSub_Name r3turn) (')') ) } {(${ VSub_Name r3turn)} ) (C {(assertEquals)} {(DQ ('integer (') (${ VSub_Name value) (') test failed.'))} {(DQ (${ VSub_Name value))} {(DQ (${ VSub_Name FLAGS_int))} ) (C {(assertFalse)} {(SQ <'expected no output to STDERR'>)} {(DQ ("[ -s '") (${ VSub_Name stderrF) ("' ]"))} ) (C {(th_showOutput)} {(${ VSub_Name r3turn)} {(DQ (${ VSub_Name stdoutF))} {(DQ (${ VSub_Name stderrF))} ) ] spids: [1417 1533] ) spids: [1411 1415] ) ] spids: [1399] ) spids: [1395 1398] ) (FuncDef name: testInvalidIntegers body: (BraceGroup children: [ (C {(_testInvalidIntegers)} {(SQ <-i>)}) (AndOr ops: [Op_DPipe] children: [(C {(flags_getoptIsEnh)}) (ControlFlow token:<ControlFlow_Return return>)] ) (C {(_testInvalidIntegers)} {(SQ <--int>)}) ] spids: [1542] ) spids: [1538 1541] ) (FuncDef name: _testInvalidIntegers body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:flag) op: Equal rhs: {($ VSub_Number '$1')} spids: [1575] ) ] spids: [1575] ) (ForEach iter_name: value iter_words: [{(${ VSub_Name TH_INT_INVALID)}] do_arg_iter: F body: (DoGroup children: [ (C {(th_clearReturn)}) (Subshell child: (CommandList children: [ (SimpleCommand words: [{(FLAGS)} {(DQ (${ VSub_Name flag))} {(DQ (${ VSub_Name value))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [1613] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [1620] ) ] ) (SimpleCommand words: [{(echo)} {($ VSub_QMark '$?')}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name returnF))} spids: [1632] ) ] ) ] ) spids: [1596 1640] ) (C {(assertFalse)} {(DQ ('invalid integer (') (${ VSub_Name value) (') test returned success.'))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(th_queryReturn)})]) left_token: <Left_CommandSub '$('> spids: [1654 1656] ) ) } ) (C {(assertFalse)} {(SQ <'expected no output to STDOUT'>)} {(DQ ("[ -s '") (${ VSub_Name stdoutF) ("' ]"))} ) (C {(assertTrue)} {(SQ <'expected output to STDERR'>)} {(DQ ("[ -s '") (${ VSub_Name stderrF) ("' ]"))} ) ] spids: [1590 1690] ) spids: [1584 1588] ) ] spids: [1572] ) spids: [1568 1571] ) (FuncDef name: testValidStrings body: (BraceGroup children: [ (C {(_testValidStrings)} {(-s)} {(single_word)}) (If arms: [ (if_arm cond: [(Sentence child:(C {(flags_getoptIsEnh)}) terminator:<Op_Semi ';'>)] action: [ (C {(_testValidStrings)} {(--str)} {(single_word)}) (C {(_testValidStrings)} {(--str)} {(SQ <'string with spaces'>)}) ] spids: [16777215 1714] ) ] spids: [16777215 1733] ) ] spids: [1699] ) spids: [1695 1698] ) (FuncDef name: _testValidStrings body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:flag) op: Equal rhs: {($ VSub_Number '$1')} spids: [1745] ) ] spids: [1745] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:value) op: Equal rhs: {($ VSub_Number '$2')} spids: [1749] ) ] spids: [1749] ) (SimpleCommand words: [{(FLAGS)} {(DQ (${ VSub_Name flag))} {(DQ (${ VSub_Name value))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [1768] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [1775] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r3turn) op: Equal rhs: {($ VSub_QMark '$?')} spids: [1783] ) ] spids: [1783] ) (C {(assertTrue)} { (DQ ("'FLAGS ") (${ VSub_Name flag) (' ') (${ VSub_Name value) ("' returned a non-zero result (") (${ VSub_Name r3turn) (')') ) } {(${ VSub_Name r3turn)} ) (C {(assertEquals)} {(DQ ('string (') (${ VSub_Name value) (') test failed.'))} {(DQ (${ VSub_Name value))} {(DQ (${ VSub_Name FLAGS_str))} ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name r3turn)} {(-eq)} {(DQ (${ VSub_Name FLAGS_TRUE))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(assertFalse)} {(SQ <'expected no output to STDERR'>)} {(DQ ("[ -s '") (${ VSub_Name stderrF) ("' ]"))} ) ] spids: [16777215 1858] ) ] else_action: [(C {(assertFatalMsg)} {(SQ <'.* spaces in options'>)})] spids: [1876 1890] ) (C {(th_showOutput)} {(${ VSub_Name r3turn)} {(DQ (${ VSub_Name stdoutF))} {(DQ (${ VSub_Name stderrF))} ) ] spids: [1742] ) spids: [1738 1741] ) (FuncDef name: testMultipleFlags body: (BraceGroup children: [ (C {(_testMultipleFlags)} {(SQ <-b>)} {(SQ <-i>)} {(SQ <-f>)} {(SQ <-s>)}) (AndOr ops: [Op_DPipe] children: [(C {(flags_getoptIsEnh)}) (ControlFlow token:<ControlFlow_Return return>)] ) (C {(_testMultipleFlags)} {(SQ <--bool>)} {(SQ <--int>)} {(SQ <--float>)} {(SQ <--str>)}) ] spids: [1918] ) spids: [1914 1917] ) (FuncDef name: _testMultipleFlags body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:boolFlag) op: Equal rhs: {($ VSub_Number '$1')} spids: [1975] ) ] spids: [1975] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:intFlag) op: Equal rhs: {($ VSub_Number '$2')} spids: [1979] ) ] spids: [1979] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:floatFlag) op: Equal rhs: {($ VSub_Number '$3')} spids: [1983] ) ] spids: [1983] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:strFlag) op: Equal rhs: {($ VSub_Number '$4')} spids: [1987] ) ] spids: [1987] ) (SimpleCommand words: [ {(FLAGS)} {(DQ (${ VSub_Name boolFlag))} {(DQ (${ VSub_Name intFlag))} {(567)} {(DQ (${ VSub_Name floatFlag))} {(123.45678)} {(DQ (${ VSub_Name strFlag))} {(SQ <some_string>)} ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [2036] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [2043] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r3turn) op: Equal rhs: {($ VSub_QMark '$?')} spids: [2051] ) ] spids: [2051] ) (C {(assertTrue)} {(DQ ('use of multiple flags returned a non-zero result'))} {(${ VSub_Name r3turn)} ) (C {(assertTrue)} {(SQ <'boolean test failed.'>)} {(DQ (${ VSub_Name FLAGS_bool))}) (C {(assertNotSame)} {(SQ <'float test failed.'>)} {(0)} {(DQ (${ VSub_Name FLAGS_float))}) (C {(assertNotSame)} {(SQ <'integer test failed.'>)} {(0)} {(DQ (${ VSub_Name FLAGS_int))}) (C {(assertNotSame)} {(SQ <'string test failed.'>)} {(SQ )} {(DQ (${ VSub_Name FLAGS_str))}) (C {(assertFalse)} {(SQ <'expected no output to STDERR'>)} {(DQ ("[ -s '") (${ VSub_Name stderrF) ("' ]"))} ) (C {(th_showOutput)} {(${ VSub_Name r3turn)} {(DQ (${ VSub_Name stdoutF))} {(DQ (${ VSub_Name stderrF))} ) ] spids: [1972] ) spids: [1968 1971] ) (FuncDef name: _testNonFlagArgs body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:argc) op: Equal rhs: {($ VSub_Number '$1')} spids: [2168] ) ] spids: [2168] ) (C {(shift)}) (SimpleCommand words: [{(FLAGS)} {(DQ ($ VSub_At '$@'))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [2182] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [2189] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r3turn) op: Equal rhs: {($ VSub_QMark '$?')} spids: [2197] ) ] spids: [2197] ) (C {(assertTrue)} {(SQ <'parse returned non-zero value.'>)} {(${ VSub_Name r3turn)}) (C {(th_showOutput)} {(${ VSub_Name r3turn)} {(DQ (${ VSub_Name stdoutF))} {(DQ (${ VSub_Name stderrF))} ) (C {(eval)} {(set)} {(--)} {(DQ (${ VSub_Name FLAGS_ARGV))}) (C {(assertEquals)} {(SQ <'wrong count of argv arguments returned.'>)} {(DQ (${ VSub_Name argc))} {($ VSub_Pound '$#')} ) (C {(assertEquals)} {(SQ <'wrong count of argc arguments returned.'>)} {(0)} {(DQ (${ VSub_Name FLAGS_ARGC))} ) ] spids: [2165] ) spids: [2161 2164] ) (FuncDef name: testSingleNonFlagArg body: (BraceGroup children:[(C {(_testNonFlagArgs)} {(1)} {(argOne)})] spids:[2281]) spids: [2277 2280] ) (FuncDef name: testMultipleNonFlagArgs body: (BraceGroup children: [(C {(_testNonFlagArgs)} {(3)} {(argOne)} {(argTwo)} {(arg3)})] spids: [2297] ) spids: [2293 2296] ) (FuncDef name: testMultipleNonFlagStringArgsWithSpaces body: (BraceGroup children: [ (AndOr ops: [Op_DPipe] children: [(C {(flags_getoptIsEnh)}) (ControlFlow token:<ControlFlow_Return return>)] ) (C {(_testNonFlagArgs)} {(3)} {(argOne)} {(SQ <'arg two'>)} {(arg3)}) ] spids: [2317] ) spids: [2313 2316] ) (FuncDef name: testFlagsWithEquals body: (BraceGroup children: [ (AndOr ops: [Op_DPipe] children: [(C {(flags_getoptIsEnh)}) (ControlFlow token:<ControlFlow_Return return>)] ) (SimpleCommand words: [{(FLAGS)} {(--str) (Lit_Other '=') (SQ <str_flag>)} {(SQ <non_flag>)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [2369] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [2376] ) ] ) (C {(assertTrue)} {(SQ <'FLAGS returned a non-zero result'>)} {($ VSub_QMark '$?')}) (C {(assertEquals)} {(SQ <'string flag not set properly'>)} {(SQ <str_flag>)} {(DQ (${ VSub_Name FLAGS_str))} ) (C {(th_showOutput)} {(${ VSub_Name r3turn)} {(DQ (${ VSub_Name stdoutF))} {(DQ (${ VSub_Name stderrF))} ) (C {(eval)} {(set)} {(--)} {(DQ (${ VSub_Name FLAGS_ARGV))}) (C {(assertEquals)} {(SQ <'wrong count of argv arguments returned.'>)} {(1)} {($ VSub_Pound '$#')} ) (C {(assertEquals)} {(SQ <'wrong count of argc arguments returned.'>)} {(1)} {(DQ (${ VSub_Name FLAGS_ARGC))} ) ] spids: [2346] ) spids: [2342 2345] ) (FuncDef name: testComplicatedCommandLineStandard body: (BraceGroup children: [ (AndOr ops: [Op_DAmp] children: [(C {(flags_getoptIsEnh)}) (ControlFlow token:<ControlFlow_Return return>)] ) (SimpleCommand words: [ {(FLAGS)} {(-i)} {(1)} {(non_flag_1)} {(-s)} {(SQ <two>)} {(non_flag_2)} {(-f)} {(3)} {(non_flag_3)} ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [2518] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [2525] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r3turn) op: Equal rhs: {($ VSub_QMark '$?')} spids: [2533] ) ] spids: [2533] ) (C {(assertTrue)} {(SQ <'FLAGS returned a non-zero result'>)} {(${ VSub_Name r3turn)}) (C {(assertEquals)} {(SQ <'failed int test'>)} {(1)} {(DQ (${ VSub_Name FLAGS_int))}) (C {(th_showOutput)} {(${ VSub_Name r3turn)} {(DQ (${ VSub_Name stdoutF))} {(DQ (${ VSub_Name stderrF))} ) (C {(eval)} {(set)} {(--)} {(DQ (${ VSub_Name FLAGS_ARGV))}) (C {(assertEquals)} {(SQ <'incorrect number of argv values'>)} {(7)} {($ VSub_Pound '$#')}) ] spids: [2475] ) spids: [2471 2474] ) (FuncDef name: testComplicatedCommandLineEnhanced body: (BraceGroup children: [ (AndOr ops: [Op_DPipe] children: [(C {(flags_getoptIsEnh)}) (ControlFlow token:<ControlFlow_Return return>)] ) (SimpleCommand words: [ {(FLAGS)} {(-i)} {(1)} {(non_flag_1)} {(--str) (Lit_Other '=') (SQ <two>)} {(non_flag_2)} {(--float)} {(3)} {(SQ <'non flag 3'>)} ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name stdoutF))} spids: [2650] ) (Redir op_id: Redir_Great fd: 2 arg_word: {(DQ (${ VSub_Name stderrF))} spids: [2657] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r3turn) op: Equal rhs: {($ VSub_QMark '$?')} spids: [2665] ) ] spids: [2665] ) (C {(assertTrue)} {(SQ <'FLAGS returned a non-zero result'>)} {(${ VSub_Name r3turn)}) (C {(assertEquals)} {(SQ <'failed int test'>)} {(1)} {(DQ (${ VSub_Name FLAGS_int))}) (C {(assertEquals)} {(SQ <'failed str test'>)} {(SQ <two>)} {(DQ (${ VSub_Name FLAGS_str))}) (C {(assertEquals)} {(SQ <'failed float test'>)} {(3)} {(DQ (${ VSub_Name FLAGS_float))}) (C {(th_showOutput)} {(${ VSub_Name r3turn)} {(DQ (${ VSub_Name stdoutF))} {(DQ (${ VSub_Name stderrF))} ) (C {(eval)} {(set)} {(--)} {(DQ (${ VSub_Name FLAGS_ARGV))}) (C {(assertEquals)} {(SQ <'incorrect number of argv values'>)} {(3)} {($ VSub_Pound '$#')}) ] spids: [2613] ) spids: [2609 2612] ) (FuncDef name: oneTimeSetUp body: (BraceGroup children: [ (C {(th_oneTimeSetUp)}) (If arms: [ (if_arm cond: [(Sentence child:(C {(flags_getoptIsStd)}) terminator:<Op_Semi ';'>)] action: [ (C {(th_warn)} {(SQ <'Standard version of getopt found. Enhanced tests will be skipped.'>)} ) ] spids: [16777215 2789] ) ] else_action: [ (C {(th_warn)} {(SQ <'Enhanced version of getopt found. Standard tests will be skipped.'>)} ) ] spids: [2799 2809] ) ] spids: [2777] ) spids: [2773 2776] ) (FuncDef name: setUp body: (BraceGroup children: [ (C {(DEFINE_boolean)} {(bool)} {(false)} {(SQ <'boolean test'>)} {(SQ <b>)}) (C {(DEFINE_float)} {(float)} {(0.0)} {(SQ <'float test'>)} {(SQ <f>)}) (C {(DEFINE_integer)} {(int)} {(0)} {(SQ <'integer test'>)} {(SQ <i>)}) (C {(DEFINE_string)} {(str)} {(SQ )} {(SQ <'string test'>)} {(SQ <s>)}) ] spids: [2818] ) spids: [2814 2817] ) (FuncDef name: tearDown body: (BraceGroup children:[(C {(flags_reset)})] spids:[2888]) spids: [2884 2887] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(-n)} { (DQ (BracedVarSub token: <VSub_Name ZSH_VERSION> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(EmptyPart)}) spids: [2907 2910] ) ) } {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SHUNIT_PARENT) op: Equal rhs: {($ VSub_Number '$0')} spids: [2917] ) ] spids: [2917] ) ] ) (C {(.)} {(DQ (${ VSub_Name TH_SHUNIT))}) ] )