(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:failed_tests) op:Equal rhs:(word.EmptyWord))]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:fixed) op:Equal rhs:{(0)})]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:success) op:Equal rhs:{(0)})]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:failed) op:Equal rhs:{(0)})]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:broken) op:Equal rhs:{(0)})]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:total) op:Equal rhs:{(0)})]
    )
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [(C {(read)} {(file)})]
      body: 
        (command.DoGroup
          children: [
            (command.WhileUntil
              keyword: <KW_While while>
              cond: [(C {(read)} {(type)} {(value)})]
              body: 
                (command.DoGroup
                  children: [
                    (command.Case
                      to_match: {($ VSub_DollarName '$type')}
                      arms: [
                        (case_arm
                          pat_list: [{(SQ )}]
                          action: [(command.ControlFlow token:<ControlFlow_Continue continue>)]
                        )
                        (case_arm
                          pat_list: [{(fixed)}]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:fixed)
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSubPart
                                        anode: 
                                          (arith_expr.ArithBinary
                                            op_id: Arith_Plus
                                            left: 
                                              (arith_expr.ArithWord
                                                w: {($ VSub_DollarName '$fixed')}
                                              )
                                            right: 
                                              (arith_expr.ArithWord
                                                w: {($ VSub_DollarName '$value')}
                                              )
                                          )
                                      )
                                    }
                                )
                              ]
                            )
                          ]
                        )
                        (case_arm
                          pat_list: [{(success)}]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:success)
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSubPart
                                        anode: 
                                          (arith_expr.ArithBinary
                                            op_id: Arith_Plus
                                            left: 
                                              (arith_expr.ArithWord
                                                w: {($ VSub_DollarName '$success')}
                                              )
                                            right: 
                                              (arith_expr.ArithWord
                                                w: {($ VSub_DollarName '$value')}
                                              )
                                          )
                                      )
                                    }
                                )
                              ]
                            )
                          ]
                        )
                        (case_arm
                          pat_list: [{(failed)}]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:failed)
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSubPart
                                        anode: 
                                          (arith_expr.ArithBinary
                                            op_id: Arith_Plus
                                            left: 
                                              (arith_expr.ArithWord
                                                w: {($ VSub_DollarName '$failed')}
                                              )
                                            right: 
                                              (arith_expr.ArithWord
                                                w: {($ VSub_DollarName '$value')}
                                              )
                                          )
                                      )
                                    }
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (C {(test)} {($ VSub_DollarName '$value')} 
                                      {(KW_Bang '!') (Lit_Other '=')} {(0)}
                                    )
                                  ]
                                  action: [
                                    (command.Assignment
                                      keyword: Assign_None
                                      pairs: [
                                        (assign_pair
                                          lhs: (lhs_expr.LhsName name:testnum)
                                          op: Equal
                                          rhs: 
                                            {
                                              (word_part.CommandSubPart
                                                command_list: 
                                                  (command.CommandList
                                                    children: [
                                                      (C {(expr)} {(DQ ($ VSub_DollarName '$file'))} 
                                                        {(Lit_Other ':')} {(SQ <'test-results/\\(t[0-9]*\\)-'>)}
                                                      )
                                                    ]
                                                  )
                                                left_token: <Left_CommandSub '$('>
                                              )
                                            }
                                        )
                                      ]
                                    )
                                    (command.Assignment
                                      keyword: Assign_None
                                      pairs: [
                                        (assign_pair
                                          lhs: (lhs_expr.LhsName name:failed_tests)
                                          op: Equal
                                          rhs: 
                                            {
                                              (DQ ($ VSub_DollarName '$failed_tests') (' ') 
                                                ($ VSub_DollarName '$testnum')
                                              )
                                            }
                                        )
                                      ]
                                    )
                                  ]
                                )
                              ]
                            )
                          ]
                        )
                        (case_arm
                          pat_list: [{(broken)}]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:broken)
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSubPart
                                        anode: 
                                          (arith_expr.ArithBinary
                                            op_id: Arith_Plus
                                            left: 
                                              (arith_expr.ArithWord
                                                w: {($ VSub_DollarName '$broken')}
                                              )
                                            right: 
                                              (arith_expr.ArithWord
                                                w: {($ VSub_DollarName '$value')}
                                              )
                                          )
                                      )
                                    }
                                )
                              ]
                            )
                          ]
                        )
                        (case_arm
                          pat_list: [{(total)}]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:total)
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.ArithSubPart
                                        anode: 
                                          (arith_expr.ArithBinary
                                            op_id: Arith_Plus
                                            left: 
                                              (arith_expr.ArithWord
                                                w: {($ VSub_DollarName '$total')}
                                              )
                                            right: 
                                              (arith_expr.ArithWord
                                                w: {($ VSub_DollarName '$value')}
                                              )
                                          )
                                      )
                                    }
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
              redirects: [
                (redir.Redir
                  op: <Redir_Less '<'>
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_DollarName '$file'))}
                )
              ]
            )
          ]
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$failed_tests'))})]
          action: [
            (C {(printf)} 
              {
                (DQ (Lit_Other '\\') ('nfailed test(s):') ($ VSub_DollarName '$failed_tests') 
                  (Lit_Other '\\') (n) (Lit_Other '\\') (n)
                )
              }
            )
          ]
        )
      ]
    )
    (C {(printf)} {(DQ ('%-8s%d') (Lit_Other '\\') (n))} {(fixed)} {($ VSub_DollarName '$fixed')})
    (C {(printf)} {(DQ ('%-8s%d') (Lit_Other '\\') (n))} {(success)} {($ VSub_DollarName '$success')})
    (C {(printf)} {(DQ ('%-8s%d') (Lit_Other '\\') (n))} {(failed)} {($ VSub_DollarName '$failed')})
    (C {(printf)} {(DQ ('%-8s%d') (Lit_Other '\\') (n))} {(broken)} {($ VSub_DollarName '$broken')})
    (C {(printf)} {(DQ ('%-8s%d') (Lit_Other '\\') (n))} {(total)} {($ VSub_DollarName '$total')})
  ]
)