(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'git apply should not get confused with rename/copy.\n'> <'\n'>)}
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (C {(mkdir)} {(-p)} {(klibc/arch/x86_64/include/klibc)})
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: <Redir_Great '>'>
          fd: 16777215
          arg_word: {(klibc/arch/x86_64/include/klibc/archsetjmp.h)}
        )
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)}
          here_end_span_id: 66
          stdin_parts: [
            ('/*\n')
            (' * arch/x86_64/include/klibc/archsetjmp.h\n')
            (' */\n')
            ('\n')
            ('#ifndef _KLIBC_ARCHSETJMP_H\n')
            ('#define _KLIBC_ARCHSETJMP_H\n')
            ('\n')
            ('struct __jmp_buf {\n')
            ('  unsigned long __rbx;\n')
            ('  unsigned long __rsp;\n')
            ('  unsigned long __rbp;\n')
            ('  unsigned long __r12;\n')
            ('  unsigned long __r13;\n')
            ('  unsigned long __r14;\n')
            ('  unsigned long __r15;\n')
            ('  unsigned long __rip;\n')
            ('};\n')
            ('\n')
            ('typedef struct __jmp_buf jmp_buf[1];\n')
            ('\n')
            ('#endif /* _SETJMP_H */\n')
          ]
        )
      ]
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(klibc/README)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)}
          here_end_span_id: 77
          stdin_parts: [('This is a simple readme file.\n')]
        )
      ]
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(patch)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)}
          here_end_span_id: 180
          stdin_parts: [
            (
'diff --git a/klibc/arch/x86_64/include/klibc/archsetjmp.h b/include/arch/cris/klibc/archsetjmp.h\n'
            )
            ('similarity index 76%\n')
            ('copy from klibc/arch/x86_64/include/klibc/archsetjmp.h\n')
            ('copy to include/arch/cris/klibc/archsetjmp.h\n')
            ('--- a/klibc/arch/x86_64/include/klibc/archsetjmp.h\n')
            ('+++ b/include/arch/cris/klibc/archsetjmp.h\n')
            ('@@ -1,21 +1,24 @@\n')
            (' /*\n')
            ('- * arch/x86_64/include/klibc/archsetjmp.h\n')
            ('+ * arch/cris/include/klibc/archsetjmp.h\n')
            ('  */\n')
            ('\n')
            (' #ifndef _KLIBC_ARCHSETJMP_H\n')
            (' #define _KLIBC_ARCHSETJMP_H\n')
            ('\n')
            (' struct __jmp_buf {\n')
            ('-  unsigned long __rbx;\n')
            ('-  unsigned long __rsp;\n')
            ('-  unsigned long __rbp;\n')
            ('-  unsigned long __r12;\n')
            ('-  unsigned long __r13;\n')
            ('-  unsigned long __r14;\n')
            ('-  unsigned long __r15;\n')
            ('-  unsigned long __rip;\n')
            ('+  unsigned long __r0;\n')
            ('+  unsigned long __r1;\n')
            ('+  unsigned long __r2;\n')
            ('+  unsigned long __r3;\n')
            ('+  unsigned long __r4;\n')
            ('+  unsigned long __r5;\n')
            ('+  unsigned long __r6;\n')
            ('+  unsigned long __r7;\n')
            ('+  unsigned long __r8;\n')
            ('+  unsigned long __sp;\n')
            ('+  unsigned long __srp;\n')
            (' };\n')
            ('\n')
            (' typedef struct __jmp_buf jmp_buf[1];\n')
            ('\n')
            ('-#endif /* _SETJMP_H */\n')
            ('+#endif /* _KLIBC_ARCHSETJMP_H */\n')
            (
'diff --git a/klibc/arch/x86_64/include/klibc/archsetjmp.h b/include/arch/m32r/klibc/archsetjmp.h\n'
            )
            ('similarity index 66%\n')
            ('rename from klibc/arch/x86_64/include/klibc/archsetjmp.h\n')
            ('rename to include/arch/m32r/klibc/archsetjmp.h\n')
            ('--- a/klibc/arch/x86_64/include/klibc/archsetjmp.h\n')
            ('+++ b/include/arch/m32r/klibc/archsetjmp.h\n')
            ('@@ -1,21 +1,21 @@\n')
            (' /*\n')
            ('- * arch/x86_64/include/klibc/archsetjmp.h\n')
            ('+ * arch/m32r/include/klibc/archsetjmp.h\n')
            ('  */\n')
            ('\n')
            (' #ifndef _KLIBC_ARCHSETJMP_H\n')
            (' #define _KLIBC_ARCHSETJMP_H\n')
            ('\n')
            (' struct __jmp_buf {\n')
            ('-  unsigned long __rbx;\n')
            ('-  unsigned long __rsp;\n')
            ('-  unsigned long __rbp;\n')
            ('+  unsigned long __r8;\n')
            ('+  unsigned long __r9;\n')
            ('+  unsigned long __r10;\n')
            ('+  unsigned long __r11;\n')
            ('   unsigned long __r12;\n')
            ('   unsigned long __r13;\n')
            ('   unsigned long __r14;\n')
            ('   unsigned long __r15;\n')
            ('-  unsigned long __rip;\n')
            (' };\n')
            ('\n')
            (' typedef struct __jmp_buf jmp_buf[1];\n')
            ('\n')
            ('-#endif /* _SETJMP_H */\n')
            ('+#endif /* _KLIBC_ARCHSETJMP_H */\n')
            ('diff --git a/klibc/README b/klibc/README\n')
            ('--- a/klibc/README\n')
            ('+++ b/klibc/README\n')
            ('@@ -1,1 +1,4 @@\n')
            (' This is a simple readme file.\n')
            ('+And we add a few\n')
            ('+lines at the\n')
            ('+end of it.\n')
            ('diff --git a/klibc/README b/klibc/arch/README\n')
            ('copy from klibc/README\n')
            ('copy to klibc/arch/README\n')
            ('--- a/klibc/README\n')
            ('+++ b/klibc/arch/README\n')
            ('@@ -1,1 +1,3 @@\n')
            (' This is a simple readme file.\n')
            ('+And we copy it to one level down, and\n')
            ('+add a few lines at the end of it.\n')
          ]
        )
      ]
    )
    (command.Pipeline
      children: [
        (C {(find)} {(klibc)} {(-type)} {(f)} {(-print)})
        (C {(xargs)} {(git)} {(update-index)} {(--add)} {(--)})
      ]
      negated: F
    )
    (C {(test_expect_success)} {(SQ <'check rename/copy patch'>)} {(SQ <'git apply --check patch'>)})
    (C {(test_expect_success)} {(SQ <'apply rename/copy patch'>)} {(SQ <'git apply --index patch'>)})
    (C {(test_done)})
  ]
)