(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'diff hunk fusing'>)}
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.FuncDef
      name: f
      body: 
        (command.BraceGroup
          children: [
            (C {(echo)} {($ VSub_Number '$1')})
            (command.Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:i) op:Equal rhs:{(1)})]
            )
            (command.WhileUntil
              keyword: <KW_While while>
              cond: [(C {(test)} {($ VSub_DollarName '$i')} {(-le)} {($ VSub_Number '$2')})]
              body: 
                (command.DoGroup
                  children: [
                    (C {(echo)} {($ VSub_DollarName '$i')})
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:i)
                          op: Equal
                          rhs: 
                            {
                              (word_part.CommandSubPart
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(expr)} {($ VSub_DollarName '$i')} {(Lit_Other '+')} {(1)})
                                    ]
                                  )
                                left_token: <Left_CommandSub '$('>
                              )
                            }
                        )
                      ]
                    )
                  ]
                )
            )
            (C {(echo)} {($ VSub_Number '$3')})
          ]
        )
    )
    (command.FuncDef
      name: t
      body: 
        (command.BraceGroup
          children: [
            (command.Case
              to_match: {($ VSub_Pound '$#')}
              arms: [
                (case_arm
                  pat_list: [{(4)}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:hunks)
                              op: Equal
                              rhs: {($ VSub_Number '$4')}
                            )
                          ]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:cmd)
                          op: Equal
                          rhs: {(DQ ('diff -U') ($ VSub_Number '$3'))}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(5)}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:hunks)
                              op: Equal
                              rhs: {($ VSub_Number '$5')}
                            )
                          ]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:cmd)
                          op: Equal
                          rhs: 
                            {
                              (DQ ('diff -U') ($ VSub_Number '$3') (' --inter-hunk-context=') 
                                ($ VSub_Number '$4')
                              )
                            }
                        )
                      ]
                    )
                  ]
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:label)
                  op: Equal
                  rhs: 
                    {
                      (DQ ($ VSub_DollarName '$cmd') (', ') ($ VSub_Number '$1') (' common ') 
                        ($ VSub_Number '$2')
                      )
                    }
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:file)
                  op: Equal
                  rhs: {(f) ($ VSub_Number '$1')}
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:expected)
                  op: Equal
                  rhs: 
                    {(expected.) ($ VSub_DollarName '$file') (.) ($ VSub_Number '$3') (.) 
                      ($ VSub_DollarName '$hunks')
                    }
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Pipeline
                      children: [(C {(test)} {(-f)} {($ VSub_DollarName '$file')})]
                      negated: T
                    )
                  ]
                  action: [
                    (command.SimpleCommand
                      words: [{(f)} {(A)} {($ VSub_Number '$1')} {(B)}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {($ VSub_DollarName '$file')}
                        )
                      ]
                    )
                    (C {(git)} {(add)} {($ VSub_DollarName '$file')})
                    (C {(git)} {(commit)} {(-q)} {(-m.)} {($ VSub_DollarName '$file')})
                    (command.SimpleCommand
                      words: [{(f)} {(X)} {($ VSub_Number '$1')} {(Y)}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {($ VSub_DollarName '$file')}
                        )
                      ]
                    )
                  ]
                )
              ]
            )
            (C {(test_expect_success)} 
              {
                (DQ ($ VSub_DollarName '$label') (': count hunks (') ($ VSub_DollarName '$hunks') (')'))
              } 
              {
                (DQ ('\n') ('\t\ttest ') 
                  (word_part.CommandSubPart
                    command_list: 
                      (command.CommandList
                        children: [
                          (command.Pipeline
                            children: [
                              (C {(git)} {($ VSub_DollarName '$cmd')} {($ VSub_DollarName '$file')})
                              (C {(grep)} {(SQ <'^@@ '>)})
                              (C {(wc)} {(-l)})
                            ]
                            negated: F
                          )
                        ]
                      )
                    left_token: <Left_CommandSub '$('>
                  ) (' = ') ($ VSub_DollarName '$hunks') ('\n') ('\t')
                )
              }
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-f)} {($ VSub_DollarName '$expected')})
                (C {(test_expect_success)} {(DQ ($ VSub_DollarName '$label') (': check output'))} 
                  {
                    (DQ ('\n') ('\t\tgit ') ($ VSub_DollarName '$cmd') (' ') ($ VSub_DollarName '$file') 
                      (" | grep -v '^index ' >actual &&\n") ('\t\ttest_cmp ') ($ VSub_DollarName '$expected') (' actual\n') ('\t')
                    )
                  }
                )
              ]
            )
          ]
        )
    )
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (command.SimpleCommand
          words: [{(cat)}]
          redirects: [
            (redir.HereDoc
              op: <Redir_DLess '<<'>
              fd: 16777215
              here_begin: {(EOF)}
              here_end_span_id: 303
              stdin_parts: [
                ('diff --git a/f1 b/f1\n')
                ('--- a/f1\n')
                ('+++ b/f1\n')
                ('@@ -1,3 +1,3 @@\n')
                ('-A\n')
                ('+X\n')
                (' 1\n')
                ('-B\n')
                ('+Y\n')
              ]
            )
            (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected.f1.0.1)})
          ]
        )
        (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
      ]
    )
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (command.SimpleCommand
          words: [{(cat)}]
          redirects: [
            (redir.HereDoc
              op: <Redir_DLess '<<'>
              fd: 16777215
              here_begin: {(EOF)}
              here_end_span_id: 329
              stdin_parts: [
                ('diff --git a/f1 b/f1\n')
                ('--- a/f1\n')
                ('+++ b/f1\n')
                ('@@ -1 +1 @@\n')
                ('-A\n')
                ('+X\n')
                ('@@ -3 +3 @@ A\n')
                ('-B\n')
                ('+Y\n')
              ]
            )
            (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected.f1.0.2)})
          ]
        )
        (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
      ]
    )
    (C {(t)} {(1)} {(line)} {(0)} {(2)})
    (C {(t)} {(1)} {(line)} {(0)} {(0)} {(2)})
    (C {(t)} {(1)} {(line)} {(0)} {(1)} {(1)})
    (C {(t)} {(1)} {(line)} {(0)} {(2)} {(1)})
    (C {(t)} {(1)} {(line)} {(1)} {(1)})
    (C {(t)} {(2)} {(lines)} {(0)} {(2)})
    (C {(t)} {(2)} {(lines)} {(0)} {(0)} {(2)})
    (C {(t)} {(2)} {(lines)} {(0)} {(1)} {(2)})
    (C {(t)} {(2)} {(lines)} {(0)} {(2)} {(1)})
    (C {(t)} {(2)} {(lines)} {(1)} {(1)})
    (C {(t)} {(3)} {(lines)} {(1)} {(2)})
    (C {(t)} {(3)} {(lines)} {(1)} {(0)} {(2)})
    (C {(t)} {(3)} {(lines)} {(1)} {(1)} {(1)})
    (C {(t)} {(3)} {(lines)} {(1)} {(2)} {(1)})
    (C {(t)} {(9)} {(lines)} {(3)} {(2)})
    (C {(t)} {(9)} {(lines)} {(3)} {(2)} {(2)})
    (C {(t)} {(9)} {(lines)} {(3)} {(3)} {(1)})
    (C {(test_done)})
  ]
)