(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'Same rename detection as t4003 but testing diff-raw.\n'> <'\n'>)}
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.Sentence
      child: (C {(.)} {(DQ ($ VSub_DollarName '$TEST_DIRECTORY')) (/diff-lib.sh)})
      terminator: <Op_Semi ';'>
    )
    (C {(test_expect_success)} {(SQ <'prepare reference tree'>)} 
      {
        (SQ <'cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&\n'> <'     echo frotz >rezrov &&\n'> 
          <'    git update-index --add COPYING rezrov &&\n'> <'    tree=$(git write-tree) &&\n'> <'    echo $tree'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'prepare work tree'>)} 
      {(SQ <'sed -e '>) (s/HOWEVER/However/) (SQ <' <COPYING >COPYING.1 &&\n'> <'    sed -e '>) 
        (s/GPL/G.P.L/g) 
        (SQ <' <COPYING >COPYING.2 &&\n'> <'    rm -f COPYING &&\n'> 
          <'    git update-index --add --remove COPYING COPYING.?'>
        )
      }
    )
    (command.SimpleCommand
      words: [{(git)} {(diff-index)} {(-C)} {($ VSub_DollarName '$tree')}]
      redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(current)})]
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)}
          here_end_span_id: 116
          stdin_parts: [
            (
':100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 0603b3238a076dc6c8022aedc6648fa523a17178 C1234\tCOPYING\tCOPYING.1\n'
            )
            (
':100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 06c67961bbaed34a127f76d261f4c0bf73eda471 R1234\tCOPYING\tCOPYING.2\n'
            )
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'validate output from rename/copy detection (#1)'>)} 
      {(SQ <'compare_diff_raw current expected'>)}
    )
    (C {(test_expect_success)} {(SQ <'prepare work tree again'>)} 
      {
        (SQ <'mv COPYING.2 COPYING &&\n'> 
          <'     git update-index --add --remove COPYING COPYING.1 COPYING.2'>
        )
      }
    )
    (command.SimpleCommand
      words: [{(git)} {(diff-index)} {(-C)} {($ VSub_DollarName '$tree')}]
      redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(current)})]
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)}
          here_end_span_id: 188
          stdin_parts: [
            (
':100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 06c67961bbaed34a127f76d261f4c0bf73eda471 M\tCOPYING\n'
            )
            (
':100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 0603b3238a076dc6c8022aedc6648fa523a17178 C1234\tCOPYING\tCOPYING.1\n'
            )
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'validate output from rename/copy detection (#2)'>)} 
      {(SQ <'compare_diff_raw current expected'>)}
    )
    (C {(test_expect_success)} {(SQ <'prepare work tree once again'>)} 
      {
        (SQ <'cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&\n'> 
          <'     git update-index --add --remove COPYING COPYING.1'>
        )
      }
    )
    (command.SimpleCommand
      words: [{(git)} {(diff-index)} {(-C)} {(--find-copies-harder)} {($ VSub_DollarName '$tree')}]
      redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(current)})]
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\E'>) (OF)}
          here_end_span_id: 261
          stdin_parts: [
            (
':100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 0603b3238a076dc6c8022aedc6648fa523a17178 C1234\tCOPYING\tCOPYING.1\n'
            )
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'validate output from rename/copy detection (#3)'>)} 
      {(SQ <'compare_diff_raw current expected'>)}
    )
    (C {(test_done)})
  ]
)