(command.CommandList
  children: [
    (C {(cd)} 
      {
        (word_part.BracedVarSub
          token: <VSub_Number 0>
          suffix_op: (suffix_op.StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ('*')})
          spids: [6 11]
        )
      }
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:fail spids:[17]) op:Equal rhs:{(0)} spids:[17])]
      spids: [17]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:tests spids:[20])
          op: Equal
          rhs: {(0)}
          spids: [20]
        )
      ]
      spids: [20]
    )
    (command.ForEach
      iter_name: test
      iter_words: [{(test/) (Lit_Other '*') (.sh)}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:tests spids:[44])
                  op: Equal
                  rhs: 
                    {
                      (word_part.ArithSubPart
                        anode: 
                          (arith_expr.ArithBinary
                            op_id: Arith_Plus
                            left: (arith_expr.ArithVarRef token:<Lit_ArithVarLike tests>)
                            right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                          )
                        spids: [45 50]
                      )
                    }
                  spids: [44]
                )
              ]
              spids: [44]
            )
            (C {(echo)} {(TEST) (Lit_Other ':')} {($ VSub_DollarName '$test')})
            (C {(./) ($ VSub_DollarName '$test')})
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:ret spids:[65])
                  op: Equal
                  rhs: {($ VSub_QMark '$?')}
                  spids: [65]
                )
              ]
              spids: [65]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {($ VSub_DollarName '$ret')} {(-eq)} {(0)} {(Lit_Other ']')})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(echo)} {(OK) (Lit_Other ':')} {(----)} {($ VSub_DollarName '$test')})
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:passed spids:[96])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArithSubPart
                                anode: 
                                  (arith_expr.ArithBinary
                                    op_id: Arith_Plus
                                    left: (arith_expr.ArithVarRef token:<Lit_ArithVarLike passed>)
                                    right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [97 102]
                              )
                            }
                          spids: [96]
                        )
                      ]
                      spids: [96]
                    )
                  ]
                  spids: [16777215 83]
                )
              ]
              else_action: [
                (C {(echo)} {(FAIL) (Lit_Other ':')} {($ VSub_DollarName '$test')} 
                  {($ VSub_DollarName '$fail')}
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:fail spids:[118])
                      op: Equal
                      rhs: 
                        {
                          (word_part.ArithSubPart
                            anode: 
                              (arith_expr.ArithBinary
                                op_id: Arith_Plus
                                left: (arith_expr.ArithVarRef token:<Lit_ArithVarLike fail>)
                                right: (arith_expr.ArithVarRef token:<Lit_ArithVarLike ret>)
                              )
                            spids: [119 124]
                          )
                        }
                      spids: [118]
                    )
                  ]
                  spids: [118]
                )
              ]
              spids: [105 127]
            )
          ]
          spids: [41 129]
        )
      spids: [34 39]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Lit_Other '[')} {($ VSub_DollarName '$fail')} {(-eq)} {(0)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(-n)} {(SQ <'SUCCESS '>)})
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:exitcode spids:[157])
                  op: Equal
                  rhs: {(0)}
                  spids: [157]
                )
              ]
              spids: [157]
            )
          ]
          spids: [16777215 145]
        )
      ]
      else_action: [
        (C {(echo)} {(-n)} {(SQ <'FAILURE '>)})
        (command.Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:exitcode spids:[172])
              op: Equal
              rhs: {(1)}
              spids: [172]
            )
          ]
          spids: [172]
        )
      ]
      spids: [160 175]
    )
    (C {(echo)} {($ VSub_DollarName '$passed')} {(/)} {($ VSub_DollarName '$tests')})
    (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{($ VSub_DollarName '$exitcode')})
  ]
)