(command.CommandList children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} { (braced_var_sub token: <Id.VSub_Name TESTS_TEST_SH> suffix_op: (suffix_op.Unary tok:<Id.VTest_Plus '+'> arg_word:{<true>}) ) } {<Id.Lit_RBracket ']'>} ) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] ) (C {<declare>} {<-g>} {<Id.Lit_VarLike 'TESTS_TEST_SH='> <true>}) (C {<declare>} {<-g>} {<-A>} {<Id.Lit_VarLike 'ASSERT_RESULTS='> (word_part.AssocArrayLiteral left: <Id.Op_LParen _> pairs: [{<total>} {<0>} {<passed>} {<0>} {<failed>} {<0>}] ) } ) (command.ShFunction name: 'assert::equals' body: (BraceGroup children: [ (C {<declare>} {<Id.Lit_VarLike 'expect='> ($ Id.VSub_Number '$1')}) (C {<declare>} {<Id.Lit_VarLike 'actual='> ($ Id.VSub_Number '$2')}) (C {<declare>} {<Id.Lit_VarLike 'message='> (braced_var_sub token: <Id.VSub_At '@'> suffix_op: (suffix_op.Slice begin:{<Id.Lit_Digits 3>}) ) } ) (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_PlusEqual left: (arith_expr.Binary op_id: Id.Arith_LBracket left: <Id.Lit_ArithVarLike ASSERT_RESULTS> right: <Id.Lit_ArithVarLike total> ) right: {<Id.Lit_Digits 1>} ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$expect'))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ ($ Id.VSub_DollarName '$actual'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} { (DQ <'FAILED ('> ($ Id.VSub_DollarName '$message') <')\n'> <'\tExpected: '> ($ Id.VSub_DollarName '$expect') <'\n'> <' Actual: '> ($ Id.VSub_DollarName '$actual') ) } ) (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_PlusEqual left: (arith_expr.Binary op_id: Id.Arith_LBracket left: <Id.Lit_ArithVarLike ASSERT_RESULTS> right: <Id.Lit_ArithVarLike failed> ) right: {<Id.Lit_Digits 1>} ) ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] spids: [101 119] ) ] ) (C {<echo>} {(DQ <'PASSED '> ($ Id.VSub_DollarName '$message'))}) (command.DParen child: (arith_expr.BinaryAssign op_id: Id.Arith_PlusEqual left: (arith_expr.Binary op_id: Id.Arith_LBracket left: <Id.Lit_ArithVarLike ASSERT_RESULTS> right: <Id.Lit_ArithVarLike passed> ) right: {<Id.Lit_Digits 1>} ) ) (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>}) ] ) ) (command.ShFunction name: 'assert::report' body: (BraceGroup children: [ (C {<echo>} { (DQ <'TESTS [total='> (braced_var_sub token: <Id.VSub_Name ASSERT_RESULTS> bracket_op: (bracket_op.ArrayIndex expr:<Id.Lit_ArithVarLike total>) ) <'] [passed='> (braced_var_sub token: <Id.VSub_Name ASSERT_RESULTS> bracket_op: (bracket_op.ArrayIndex expr:<Id.Lit_ArithVarLike passed>) ) <'] [failed='> (braced_var_sub token: <Id.VSub_Name ASSERT_RESULTS> bracket_op: (bracket_op.ArrayIndex expr:<Id.Lit_ArithVarLike failed>) ) <']'> ) } ) ] ) ) ] )