(command.CommandList
  children: [
    (command.Sentence
      child: 
        (command.Simple
          blame_tok: <set>
          more_env: []
          words: [{<set>} {<-u>}]
          redirects: []
          do_fork: T
        )
      terminator: <Id.Op_Semi _>
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <Id.Lit_LBracket '['>
          more_env: []
          words: [
            {<Id.Lit_LBracket '['>}
            {
              (BracedVarSub
                left: <Id.Left_DollarBrace '${'>
                token: <Id.VSub_Name COMMON_SH>
                var_name: COMMON_SH
                suffix_op: (suffix_op.Unary op:<Id.VTest_Plus _> arg_word:{<true>})
                right: <Id.Right_DollarBrace '}'>
              )
            }
            {<Id.Lit_RBracket ']'>}
          ]
          redirects: []
          do_fork: T
        )
        (command.ControlFlow keyword:<Id.ControlFlow_Return return>)
      ]
      ops: [<Id.Op_DAmp _>]
    )
    (command.Simple
      blame_tok: <declare>
      more_env: []
      words: [{<declare>} {<-g>} {<Id.Lit_VarLike 'COMMON_SH='> <true>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      keyword: <Id.KW_Function function>
      name_tok: <stderr>
      name: stderr
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ (${ Id.VSub_At '@'))}]
              redirects: [(Redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})]
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      keyword: <Id.KW_Function function>
      name_tok: <functionExists>
      name: functionExists
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <declare>
              more_env: []
              words: [{<declare>} {<Id.Lit_VarLike 'functionName='> (DQ (${ Id.VSub_Number 1))}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <declare>
              more_env: []
              words: [
                {<declare>}
                {<Id.Lit_VarLike 'type='> 
                  (CommandSub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.Simple
                        blame_tok: <type>
                        more_env: []
                        words: [{<type>} {<-t>} {(DQ (${ Id.VSub_Name functionName))}]
                        redirects: []
                        do_fork: T
                      )
                    right: <Id.Eof_RParen _>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              left: <Id.KW_DLeftBracket '[['>
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobNEqual
                                  left: {($ Id.VSub_QMark '?')}
                                  right: {<0>}
                                )
                              right: <Id.Lit_DRightBracket ']]'>
                              redirects: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [(command.ControlFlow keyword:<Id.ControlFlow_Return return> arg_word:{<1>})]
                  spids: [110 123]
                )
                (IfArm
                  keyword: <Id.KW_Elif elif>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              left: <Id.KW_DLeftBracket '[['>
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {($ Id.VSub_DollarName type)}
                                  right: {(DQ <function>)}
                                )
                              right: <Id.Lit_DRightBracket ']]'>
                              redirects: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [(command.ControlFlow keyword:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [135 150]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [(command.ControlFlow keyword:<Id.ControlFlow_Return return> arg_word:{<1>})]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <declare>
      more_env: []
      words: [
        {<declare>}
        {<-g>}
        {<-A>}
        {<Id.Lit_VarLike 'ASSERT_RESULTS='> 
          (word_part.AssocArrayLiteral
            left: <Id.Op_LParen _>
            pairs: [
              (AssocPair key:{<total>} value:{<0>})
              (AssocPair key:{<passed>} value:{<0>})
              (AssocPair key:{<failed>} value:{<0>})
            ]
            right: <Id.Right_ShArrayLiteral _>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      keyword: <Id.KW_Function function>
      name_tok: <assert>
      name: 'assert::equals'
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <declare>
              more_env: []
              words: [{<declare>} {<Id.Lit_VarLike 'expect='> ($ Id.VSub_Number 1)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <declare>
              more_env: []
              words: [{<declare>} {<Id.Lit_VarLike 'actual='> ($ Id.VSub_Number 2)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <declare>
              more_env: []
              words: [
                {<declare>}
                {<Id.Lit_VarLike 'message='> 
                  (BracedVarSub
                    left: <Id.Left_DollarBrace '${'>
                    token: <Id.VSub_At '@'>
                    var_name: '@'
                    suffix_op: (suffix_op.Slice begin:{<Id.Lit_Digits 3>})
                    right: <Id.Arith_RBrace _>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.DParen
              left: <Id.Op_DLeftParen _>
              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>}
                )
              right: <Id.Op_DRightParen _>
              redirects: []
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              blame_tok: <Id.Lit_LBracket '['>
                              more_env: []
                              words: [
                                {<Id.Lit_LBracket '['>}
                                {(DQ ($ Id.VSub_DollarName expect))}
                                {<Id.KW_Bang '!'> <Id.Lit_Equals '='>}
                                {(DQ ($ Id.VSub_DollarName actual))}
                                {<Id.Lit_RBracket ']'>}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [
                        {<echo>}
                        {
                          (DQ <'FAILED (\''> ($ Id.VSub_DollarName expect) <'\' != \''> 
                            ($ Id.VSub_DollarName actual) <'\') '> ($ Id.VSub_DollarName message)
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <log>
                      more_env: []
                      words: [
                        {<log>}
                        {
                          (DQ <'FAILED (\''> ($ Id.VSub_DollarName expect) <'\' != \''> 
                            ($ Id.VSub_DollarName actual) <'\') '> ($ Id.VSub_DollarName message)
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.DParen
                      left: <Id.Op_DLeftParen _>
                      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>}
                        )
                      right: <Id.Op_DRightParen _>
                      redirects: []
                    )
                    (command.ControlFlow
                      keyword: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [243 261]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'PASSED '> ($ Id.VSub_DollarName message))}]
              redirects: []
              do_fork: T
            )
            (command.DParen
              left: <Id.Op_DLeftParen _>
              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>}
                )
              right: <Id.Op_DRightParen _>
              redirects: []
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      keyword: <Id.KW_Function function>
      name_tok: <assert>
      name: 'assert::report'
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [
                {<echo>}
                {
                  (DQ <'TESTS [total='> 
                    (BracedVarSub
                      left: <Id.Left_DollarBrace '${'>
                      token: <Id.VSub_Name ASSERT_RESULTS>
                      var_name: ASSERT_RESULTS
                      bracket_op: (bracket_op.ArrayIndex expr:($ Id.Lit_ArithVarLike total))
                      right: <Id.Right_DollarBrace '}'>
                    ) <'] [passed='> 
                    (BracedVarSub
                      left: <Id.Left_DollarBrace '${'>
                      token: <Id.VSub_Name ASSERT_RESULTS>
                      var_name: ASSERT_RESULTS
                      bracket_op: (bracket_op.ArrayIndex expr:($ Id.Lit_ArithVarLike passed))
                      right: <Id.Right_DollarBrace '}'>
                    ) <'] [failed='> 
                    (BracedVarSub
                      left: <Id.Left_DollarBrace '${'>
                      token: <Id.VSub_Name ASSERT_RESULTS>
                      var_name: ASSERT_RESULTS
                      bracket_op: (bracket_op.ArrayIndex expr:($ Id.Lit_ArithVarLike failed))
                      right: <Id.Right_DollarBrace '}'>
                    ) <']'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
  ]
)