(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:failed_tests) op: assign_op.Equal rhs: (word.Empty) spids: [4] ) ] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:fixed) op:assign_op.Equal rhs:{(0)} spids:[6])] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:success) op: assign_op.Equal rhs: {(0)} spids: [9] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:failed) op: assign_op.Equal rhs: {(0)} spids: [12] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:broken) op: assign_op.Equal rhs: {(0)} spids: [15] ) ] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:total) op:assign_op.Equal rhs:{(0)} spids:[18])] ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:22) cond: [(C {(read)} {(file)})] body: (command.DoGroup children: [ (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:31) cond: [(C {(read)} {(type)} {(value)})] body: (command.DoGroup children: [ (command.Case to_match: {($ Id.VSub_DollarName '$type')} arms: [ (case_arm pat_list: [{(SQ )}] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Continue val:continue span_id:55) ) ] spids: [50 52 57 -1] ) (case_arm pat_list: [{(fixed)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fixed) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$fixed')} ) right: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$value')} ) ) ) } spids: [64] ) ] ) ] spids: [60 61 74 -1] ) (case_arm pat_list: [{(success)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:success) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$success')} ) right: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$value')} ) ) ) } spids: [81] ) ] ) ] spids: [77 78 91 -1] ) (case_arm pat_list: [{(failed)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:failed) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$failed')} ) right: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$value')} ) ) ) } spids: [98] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(test)} {($ Id.VSub_DollarName '$value')} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(0)} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:testnum) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 125 ) command_list: (command.CommandList children: [ (C {(expr)} {(DQ ($ Id.VSub_DollarName '$file'))} {(Id.Lit_Other ':')} {(SQ (Token id:Id.Lit_Chars val:'test-results/\\(t[0-9]*\\)-' span_id:135))} ) ] ) ) } spids: [124] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:failed_tests) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$failed_tests') (' ') ($ Id.VSub_DollarName '$testnum') ) } spids: [140] ) ] ) ] spids: [109 121] ) ] ) ] spids: [94 95 151 -1] ) (case_arm pat_list: [{(broken)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:broken) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$broken')} ) right: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$value')} ) ) ) } spids: [158] ) ] ) ] spids: [154 155 168 -1] ) (case_arm pat_list: [{(total)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:total) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$total')} ) right: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$value')} ) ) ) } spids: [175] ) ] ) ] spids: [171 172 185 -1] ) ] ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_Less val:'<' span_id:193) fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$file'))} ) ] ) ] ) ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$failed_tests'))})] action: [ (C {(printf)} { (DQ (Id.Lit_Other '\\') ('nfailed test(s):') ($ Id.VSub_DollarName '$failed_tests') (Id.Lit_Other '\\') (n) (Id.Lit_Other '\\') (n) ) } ) ] spids: [201 211] ) ] ) (C {(printf)} {(DQ ('%-8s%d') (Id.Lit_Other '\\') (n))} {(fixed)} {($ Id.VSub_DollarName '$fixed')}) (C {(printf)} {(DQ ('%-8s%d') (Id.Lit_Other '\\') (n))} {(success)} {($ Id.VSub_DollarName '$success')} ) (C {(printf)} {(DQ ('%-8s%d') (Id.Lit_Other '\\') (n))} {(failed)} {($ Id.VSub_DollarName '$failed')}) (C {(printf)} {(DQ ('%-8s%d') (Id.Lit_Other '\\') (n))} {(broken)} {($ Id.VSub_DollarName '$broken')}) (C {(printf)} {(DQ ('%-8s%d') (Id.Lit_Other '\\') (n))} {(total)} {($ Id.VSub_DollarName '$total')}) ] )