(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'diff hunk fusing'>)}
          spids: [4]
        )
      ]
      spids: [4]
    )
    (C {(.)} {(./test-lib.sh)})
    (FuncDef
      name: f
      body: 
        (BraceGroup
          children: [
            (C {(echo)} {($ VSub_Number '$1')})
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:i) op:Equal rhs:{(1)} spids:[27])]
              spids: [27]
            )
            (WhileUntil
              keyword: <KW_While while>
              cond: [(C {(test)} {($ VSub_Name '$i')} {(-le)} {($ VSub_Number '$2')})]
              body: 
                (DoGroup
                  children: [
                    (C {(echo)} {($ VSub_Name '$i')})
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:i)
                          op: Equal
                          rhs: 
                            {
                              (CommandSubPart
                                command_list: 
                                  (CommandList
                                    children: [
                                      (C {(expr)} {($ VSub_Name '$i')} {(Lit_Other '+')} {(1)})
                                    ]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [51 59]
                              )
                            }
                          spids: [50]
                        )
                      ]
                      spids: [50]
                    )
                  ]
                  spids: [42 62]
                )
            )
            (C {(echo)} {($ VSub_Number '$3')})
          ]
          spids: [19]
        )
      spids: [15 18]
    )
    (FuncDef
      name: t
      body: 
        (BraceGroup
          children: [
            (Case
              to_match: {($ VSub_Pound '$#')}
              arms: [
                (case_arm
                  pat_list: [{(4)}]
                  action: [
                    (Sentence
                      child: 
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:hunks)
                              op: Equal
                              rhs: {($ VSub_Number '$4')}
                              spids: [89]
                            )
                          ]
                          spids: [89]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:cmd)
                          op: Equal
                          rhs: {(DQ ('diff -U') ($ VSub_Number '$3'))}
                          spids: [93]
                        )
                      ]
                      spids: [93]
                    )
                  ]
                  spids: [86 87 98 16777215]
                )
                (case_arm
                  pat_list: [{(5)}]
                  action: [
                    (Sentence
                      child: 
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:hunks)
                              op: Equal
                              rhs: {($ VSub_Number '$5')}
                              spids: [104]
                            )
                          ]
                          spids: [104]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:cmd)
                          op: Equal
                          rhs: 
                            {
                              (DQ ('diff -U') ($ VSub_Number '$3') (' --inter-hunk-context=') 
                                ($ VSub_Number '$4')
                              )
                            }
                          spids: [108]
                        )
                      ]
                      spids: [108]
                    )
                  ]
                  spids: [101 102 115 16777215]
                )
              ]
              spids: [79 83 118]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:label)
                  op: Equal
                  rhs: 
                    {
                      (DQ ($ VSub_Name '$cmd') (', ') ($ VSub_Number '$1') (' common ') 
                        ($ VSub_Number '$2')
                      )
                    }
                  spids: [121]
                )
              ]
              spids: [121]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:file)
                  op: Equal
                  rhs: {(f) ($ VSub_Number '$1')}
                  spids: [131]
                )
              ]
              spids: [131]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:expected)
                  op: Equal
                  rhs: 
                    {(expected.) ($ VSub_Name '$file') (.) ($ VSub_Number '$3') (.) 
                      ($ VSub_Name '$hunks')
                    }
                  spids: [136]
                )
              ]
              spids: [136]
            )
            (If
              arms: [
                (if_arm
                  cond: [(Pipeline children:[(C {(test)} {(-f)} {($ VSub_Name '$file')})] negated:T)]
                  action: [
                    (SimpleCommand
                      words: [{(f)} {(A)} {($ VSub_Number '$1')} {(B)}]
                      redirects: [
                        (Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {($ VSub_Name '$file')}
                        )
                      ]
                    )
                    (C {(git)} {(add)} {($ VSub_Name '$file')})
                    (C {(git)} {(commit)} {(-q)} {(-m.)} {($ VSub_Name '$file')})
                    (SimpleCommand
                      words: [{(f)} {(X)} {($ VSub_Number '$1')} {(Y)}]
                      redirects: [
                        (Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {($ VSub_Name '$file')}
                        )
                      ]
                    )
                  ]
                  spids: [16777215 157]
                )
              ]
              spids: [16777215 202]
            )
            (C {(test_expect_success)} 
              {(DQ ($ VSub_Name '$label') (': count hunks (') ($ VSub_Name '$hunks') (')'))} 
              {
                (DQ ('\n') ('\t\ttest ') 
                  (CommandSubPart
                    command_list: 
                      (CommandList
                        children: [
                          (Pipeline
                            children: [
                              (C {(git)} {($ VSub_Name '$cmd')} {($ VSub_Name '$file')})
                              (C {(grep)} {(SQ <'^@@ '>)})
                              (C {(wc)} {(-l)})
                            ]
                            negated: F
                          )
                        ]
                      )
                    left_token: <Left_CommandSub '$('>
                    spids: [218 238]
                  ) (' = ') ($ VSub_Name '$hunks') ('\n') ('\t')
                )
              }
            )
            (AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-f)} {($ VSub_Name '$expected')})
                (C {(test_expect_success)} {(DQ ($ VSub_Name '$label') (': check output'))} 
                  {
                    (DQ ('\n') ('\t\tgit ') ($ VSub_Name '$cmd') (' ') ($ VSub_Name '$file') 
                      (" | grep -v '^index ' >actual &&\n") ('\t\ttest_cmp ') ($ VSub_Name '$expected') (' actual\n') ('\t')
                    )
                  }
                )
              ]
            )
          ]
          spids: [76]
        )
      spids: [72 75]
    )
    (AndOr
      ops: [Op_DPipe]
      children: [
        (SimpleCommand
          words: [{(cat)}]
          redirects: [
            (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 op:<Redir_Great '>'> fd:16777215 arg_word:{(expected.f1.0.1)})
          ]
        )
        (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
      ]
    )
    (AndOr
      ops: [Op_DPipe]
      children: [
        (SimpleCommand
          words: [{(cat)}]
          redirects: [
            (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 op:<Redir_Great '>'> fd:16777215 arg_word:{(expected.f1.0.2)})
          ]
        )
        (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)})
  ]
)