(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: 
            {
              (SQ (Token id:Id.Lit_Chars val:'More rename detection\n' span_id:15) 
                (Token id:Id.Lit_Chars val:'\n' span_id:16)
              )
            }
          spids: [13]
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.Sentence
      child: (C {(.)} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) (/diff-lib.sh)})
      terminator: (Token id:Id.Op_Semi val:';' span_id:30)
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'prepare reference tree' span_id:40))} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&\n'
            span_id: 46
          ) (Token id:Id.Lit_Chars val:'     echo frotz >rezrov &&\n' span_id:47) 
          (Token
            id: Id.Lit_Chars
            val: '    git update-index --add COPYING rezrov &&\n'
            span_id: 48
          ) (Token id:Id.Lit_Chars val:'    tree=$(git write-tree) &&\n' span_id:49) 
          (Token id:Id.Lit_Chars val:'    echo $tree' span_id:50)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'prepare work tree' span_id:59))} 
      {(SQ (Token id:Id.Lit_Chars val:'sed -e ' span_id:65)) (s/HOWEVER/However/) 
        (SQ (Token id:Id.Lit_Chars val:' <COPYING >COPYING.1 &&\n' span_id:69) 
          (Token id:Id.Lit_Chars val:'    sed -e ' span_id:70)
        ) (s/GPL/G.P.L/g) 
        (SQ (Token id:Id.Lit_Chars val:' <COPYING >COPYING.2 &&\n' span_id:74) 
          (Token id:Id.Lit_Chars val:'    rm -f COPYING &&\n' span_id:75) (Token id:Id.Lit_Chars val:'    git update-index --add --remove COPYING COPYING.?' span_id:76)
        )
      }
    )
    (command.Simple
      words: [{(git)} {(diff-index)} {(-C)} {(-p)} {($ Id.VSub_DollarName '$tree')}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:108)
          fd: -1
          arg_word: {(current)}
        )
      ]
      more_env: [(env_pair name:GIT_DIFF_OPTS val:{(--unified) (Id.Lit_Equals '=') (0)} spids:[93])]
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:113)
          fd: -1
          arg_word: {(expected)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:116)
          fd: -1
          here_begin: 
            {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:117)) 
              (OF)
            }
          here_end_span_id: 142
          stdin_parts: [
            ('diff --git a/COPYING b/COPYING.1\n')
            ('copy from COPYING\n')
            ('copy to COPYING.1\n')
            ('--- a/COPYING\n')
            ('+++ b/COPYING.1\n')
            ('@@ -6 +6 @@\n')
            ('- HOWEVER, in order to allow a migration to GPLv3 if that seems like\n')
            ('+ However, in order to allow a migration to GPLv3 if that seems like\n')
            ('diff --git a/COPYING b/COPYING.2\n')
            ('rename from COPYING\n')
            ('rename to COPYING.2\n')
            ('--- a/COPYING\n')
            ('+++ b/COPYING.2\n')
            ('@@ -2 +2 @@\n')
            ('- Note that the only valid version of the GPL as far as this project\n')
            ('+ Note that the only valid version of the G.P.L as far as this project\n')
            ('@@ -6 +6 @@\n')
            ('- HOWEVER, in order to allow a migration to GPLv3 if that seems like\n')
            ('+ HOWEVER, in order to allow a migration to G.P.Lv3 if that seems like\n')
            ('@@ -12 +12 @@\n')
            ('-\tThis file is licensed under the GPL v2, or a later version\n')
            ('+\tThis file is licensed under the G.P.L v2, or a later version\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'validate output from rename/copy detection (#1)' span_id:149))} {(SQ (Token id:Id.Lit_Chars val:'compare_diff_patch current expected' span_id:155))}
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'prepare work tree again' span_id:164))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'mv COPYING.2 COPYING &&\n' span_id:170) 
          (Token
            id: Id.Lit_Chars
            val: '     git update-index --add --remove COPYING COPYING.1 COPYING.2'
            span_id: 171
          )
        )
      }
    )
    (command.Simple
      words: [{(git)} {(diff-index)} {(-C)} {(-p)} {($ Id.VSub_DollarName '$tree')}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:203)
          fd: -1
          arg_word: {(current)}
        )
      ]
      more_env: [(env_pair name:GIT_DIFF_OPTS val:{(--unified) (Id.Lit_Equals '=') (0)} spids:[188])]
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:208)
          fd: -1
          arg_word: {(expected)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:211)
          fd: -1
          here_begin: 
            {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:212)) 
              (OF)
            }
          here_end_span_id: 235
          stdin_parts: [
            ('diff --git a/COPYING b/COPYING\n')
            ('--- a/COPYING\n')
            ('+++ b/COPYING\n')
            ('@@ -2 +2 @@\n')
            ('- Note that the only valid version of the GPL as far as this project\n')
            ('+ Note that the only valid version of the G.P.L as far as this project\n')
            ('@@ -6 +6 @@\n')
            ('- HOWEVER, in order to allow a migration to GPLv3 if that seems like\n')
            ('+ HOWEVER, in order to allow a migration to G.P.Lv3 if that seems like\n')
            ('@@ -12 +12 @@\n')
            ('-\tThis file is licensed under the GPL v2, or a later version\n')
            ('+\tThis file is licensed under the G.P.L v2, or a later version\n')
            ('diff --git a/COPYING b/COPYING.1\n')
            ('copy from COPYING\n')
            ('copy to COPYING.1\n')
            ('--- a/COPYING\n')
            ('+++ b/COPYING.1\n')
            ('@@ -6 +6 @@\n')
            ('- HOWEVER, in order to allow a migration to GPLv3 if that seems like\n')
            ('+ However, in order to allow a migration to GPLv3 if that seems like\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'validate output from rename/copy detection (#2)' span_id:242))} {(SQ (Token id:Id.Lit_Chars val:'compare_diff_patch current expected' span_id:248))}
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'prepare work tree once again' span_id:257))} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&\n'
            span_id: 263
          ) (Token id:Id.Lit_Chars val:'     git update-index --add --remove COPYING COPYING.1' span_id:264)
        )
      }
    )
    (command.Simple
      words: [
        {(git)}
        {(diff-index)}
        {(-C)}
        {(--find-copies-harder)}
        {(-p)}
        {($ Id.VSub_DollarName '$tree')}
      ]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:303)
          fd: -1
          arg_word: {(current)}
        )
      ]
      more_env: [(env_pair name:GIT_DIFF_OPTS val:{(--unified) (Id.Lit_Equals '=') (0)} spids:[284])]
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:308)
          fd: -1
          arg_word: {(expected)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:311)
          fd: -1
          here_begin: 
            {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:312)) 
              (OF)
            }
          here_end_span_id: 323
          stdin_parts: [
            ('diff --git a/COPYING b/COPYING.1\n')
            ('copy from COPYING\n')
            ('copy to COPYING.1\n')
            ('--- a/COPYING\n')
            ('+++ b/COPYING.1\n')
            ('@@ -6 +6 @@\n')
            ('- HOWEVER, in order to allow a migration to GPLv3 if that seems like\n')
            ('+ However, in order to allow a migration to GPLv3 if that seems like\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'validate output from rename/copy detection (#3)' span_id:330))} {(SQ (Token id:Id.Lit_Chars val:'compare_diff_patch current expected' span_id:336))}
    )
    (C {(test_done)})
  ]
)