(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 op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<test-patch>})
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.MultiLine
              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'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (command.Simple
      words: [{<echo>} {(SQ <'This is foo'>)}]
      redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<foo>})]
      do_fork: T
    )
    (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 op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<test-patch>})
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.MultiLine
              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'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (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>})
  ]
)