(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description spids:[21])
          op: Equal
          rhs: {(SQ <'git apply handling copy/rename patch.\n'> <'\n'>)}
          spids: [21]
        )
      ]
      spids: [21]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(test-patch)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)}
          here_end_span_id: 54
          stdin_parts: [
            ('diff --git a/foo b/bar\n')
            ('similarity index 47%\n')
            ('rename from foo\n')
            ('rename to bar\n')
            ('--- a/foo\n')
            ('+++ b/bar\n')
            ('@@ -1 +1 @@\n')
            ('-This is foo\n')
            ('+This is bar\n')
          ]
        )
      ]
    )
    (command.SimpleCommand
      words: [{(echo)} {(SQ <'This is foo'>)}]
      redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(foo)})]
    )
    (C {(chmod)} {(Lit_Other '+') (x)} {(foo)})
    (C {(test_expect_success)} {(setup)} {(SQ <'git update-index --add foo'>)})
    (C {(test_expect_success)} {(apply)} {(SQ <'git apply --index --stat --summary --apply test-patch'>)})
    (C {(test_expect_success)} {(FILEMODE)} {(validate)} 
      {(SQ <'test -f bar && ls -l bar | grep "^-..x......"'>)}
    )
    (C {(test_expect_success)} {(SQ <'apply reverse'>)} 
      {
        (SQ <'git apply -R --index --stat --summary --apply test-patch &&\n'> 
          <'     test "$(cat foo)" = "This is foo"'>
        )
      }
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(test-patch)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)}
          here_end_span_id: 140
          stdin_parts: [
            ('diff --git a/foo b/bar\n')
            ('similarity index 47%\n')
            ('copy from foo\n')
            ('copy to bar\n')
            ('--- a/foo\n')
            ('+++ b/bar\n')
            ('@@ -1 +1 @@\n')
            ('-This is foo\n')
            ('+This is bar\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'apply copy'>)} 
      {
        (SQ <'git apply --index --stat --summary --apply test-patch &&\n'> 
          <'     test "$(cat bar)" = "This is bar" && test "$(cat foo)" = "This is foo"'>
        )
      }
    )
    (C {(test_done)})
  ]
)