(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'apply with fuzz and offset'>)}
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.FuncDef
      name: dotest
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp Op_DAmp]
              children: [
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:name)
                      op: Equal
                      rhs: {(DQ ($ VSub_Number '$1'))}
                    )
                  ]
                )
                (C {(shift)})
                (C {(test_expect_success)} {(DQ ($ VSub_DollarName '$name'))} 
                  {
                    (DQ ('\n') ('\t\tgit checkout-index -f -q -u file &&\n') ('\t\tgit apply ') 
                      ($ VSub_Star '$*') (' &&\n') ('\t\ttest_cmp expect file\n') ('\t')
                    )
                  }
                )
              ]
            )
          ]
        )
    )
    (C {(test_expect_success)} {(setup)} 
      {
        (SQ <'\n'> <'\n'> <'\tfor i in 1 2 3 4 5 6 7 8 9 10 11 12\n'> <'\tdo\n'> <'\t\techo $i\n'> 
          <'\tdone >file &&\n'> <'\tgit update-index --add file &&\n'> <'\tfor i in 1 2 3 4 5 6 7 a b c d e 8 9 10 11 12\n'> <'\tdo\n'> 
          <'\t\techo $i\n'> <'\tdone >file &&\n'> <'\tcat file >expect &&\n'> <'\tgit diff >O0.diff &&\n'> <'\n'> 
          <'\tsed -e "s/@@ -5,6 +5,11 @@/@@ -2,6 +2,11 @@/" >O1.diff O0.diff &&\n'> <'\tsed -e "s/@@ -5,6 +5,11 @@/@@ -7,6 +7,11 @@/" >O2.diff O0.diff &&\n'> 
          <'\tsed -e "s/@@ -5,6 +5,11 @@/@@ -19,6 +19,11 @@/" >O3.diff O0.diff &&\n'> <'\n'> <'\tsed -e "s/^ 5/ S/" >F0.diff O0.diff &&\n'> <'\tsed -e "s/^ 5/ S/" >F1.diff O1.diff &&\n'> 
          <'\tsed -e "s/^ 5/ S/" >F2.diff O2.diff &&\n'> <'\tsed -e "s/^ 5/ S/" >F3.diff O3.diff\n'> <'\n'>
        )
      }
    )
    (C {(dotest)} {(SQ <'unmodified patch'>)} {(O0.diff)})
    (C {(dotest)} {(SQ <'minus offset'>)} {(O1.diff)})
    (C {(dotest)} {(SQ <'plus offset'>)} {(O2.diff)})
    (C {(dotest)} {(SQ <'big offset'>)} {(O3.diff)})
    (C {(dotest)} {(SQ <'fuzz with no offset'>)} {(-C2)} {(F0.diff)})
    (C {(dotest)} {(SQ <'fuzz with minus offset'>)} {(-C2)} {(F1.diff)})
    (C {(dotest)} {(SQ <'fuzz with plus offset'>)} {(-C2)} {(F2.diff)})
    (C {(dotest)} {(SQ <'fuzz with big offset'>)} {(-C2)} {(F3.diff)})
    (C {(test_done)})
  ]
)