(command.CommandList
  children: [
    (C {<cd>} 
      {
        (braced_var_sub
          token: <Id.VSub_Number 0>
          suffix_op: 
            (suffix_op.Unary
              tok: <Id.VOp1_Percent '%'>
              arg_word: {<Id.Lit_Slash '/'> <Id.Lit_Other '*'>}
            )
        )
      }
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:fail) op:assign_op.Equal rhs:{<0>} spids:[17])]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:tests) op:assign_op.Equal rhs:{<0>} spids:[20])]
    )
    (command.ForEach
      iter_name: test
      iter_words: [{<'test/'> <Id.Lit_Star '*'> <.sh>}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:tests)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (word_part.ArithSub
                        anode: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Plus
                            left: <Id.Lit_ArithVarLike tests>
                            right: {<Id.Lit_Digits 1>}
                          )
                      )
                    }
                  spids: [44]
                )
              ]
            )
            (C {<echo>} {<TEST> <Id.Lit_Colon ':'>} {($ Id.VSub_DollarName '$test')})
            (C {<'./'> ($ Id.VSub_DollarName '$test')})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:ret)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '$?')}
                  spids: [65]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$ret')} {<-eq>} {<0>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} {<OK> <Id.Lit_Colon ':'>} {<---->} {($ Id.VSub_DollarName '$test')})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:passed)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (word_part.ArithSub
                                anode: 
                                  (arith_expr.Binary
                                    op_id: Id.Arith_Plus
                                    left: <Id.Lit_ArithVarLike passed>
                                    right: {<Id.Lit_Digits 1>}
                                  )
                              )
                            }
                          spids: [96]
                        )
                      ]
                    )
                  ]
                  spids: [69 83]
                )
              ]
              else_action: [
                (C {<echo>} {<FAIL> <Id.Lit_Colon ':'>} {($ Id.VSub_DollarName '$test')} 
                  {($ Id.VSub_DollarName '$fail')}
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:fail)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (word_part.ArithSub
                            anode: 
                              (arith_expr.Binary
                                op_id: Id.Arith_Plus
                                left: <Id.Lit_ArithVarLike fail>
                                right: <Id.Lit_ArithVarLike ret>
                              )
                          )
                        }
                      spids: [118]
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$fail')} {<-eq>} {<0>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {<-n>} {(SQ <'SUCCESS '>)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:exitcode)
                  op: assign_op.Equal
                  rhs: {<0>}
                  spids: [157]
                )
              ]
            )
          ]
          spids: [132 145]
        )
      ]
      else_action: [
        (C {<echo>} {<-n>} {(SQ <'FAILURE '>)})
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:exitcode)
              op: assign_op.Equal
              rhs: {<1>}
              spids: [172]
            )
          ]
        )
      ]
    )
    (C {<echo>} {($ Id.VSub_DollarName '$passed')} {<'/'>} {($ Id.VSub_DollarName '$tests')})
    (command.ControlFlow
      token: <Id.ControlFlow_Exit exit>
      arg_word: {($ Id.VSub_DollarName '$exitcode')}
    )
  ]
)