(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'git apply handling copy/rename patch.\n'> <'\n'>)}
          spids: [13]
        )
      ]
    )
    (C {<.>} {<./test-lib.sh>})
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<test-patch>})
        (redir.HereDoc
          op: <Id.Redir_DLess '<<'>
          fd: -1
          here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'>) <OF>}
          here_end_span_id: 46
          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.Simple
      words: [{<echo>} {(SQ <'This is foo'>)}]
      redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<foo>})]
    )
    (C {<chmod>} {<Id.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.Simple
      words: [{<cat>}]
      redirects: [
        (redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<test-patch>})
        (redir.HereDoc
          op: <Id.Redir_DLess '<<'>
          fd: -1
          here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'>) <OF>}
          here_end_span_id: 132
          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>})
  ]
)