(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:'Test built-in diff output engine.\n' span_id:15) 
                (Token id:Id.Lit_Chars val:'\n' span_id:16)
              )
            }
          spids: [13]
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (C {(.)} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) (/diff-lib.sh)})
    (command.Simple
      words: [
        {(echo)}
        {
          (SQ (Token id:Id.Lit_Chars val:'Line 1\n' span_id:37) 
            (Token id:Id.Lit_Chars val:'Line 2\n' span_id:38) (Token id:Id.Lit_Chars val:'line 3' span_id:39)
          )
        }
      ]
      redirects: [
        (redir.Redir op:(Token id:Id.Redir_Great val:'>' span_id:33) fd:-1 arg_word:{(path0)})
      ]
    )
    (command.Simple
      words: [{(cat)} {(path0)}]
      redirects: [
        (redir.Redir op:(Token id:Id.Redir_Great val:'>' span_id:46) fd:-1 arg_word:{(path1)})
      ]
    )
    (C {(chmod)} {(Id.Lit_Other '+') (x)} {(path1)})
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'update-index --add two files with and without +x.'
            span_id: 60
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:64) 
          (Token id:Id.Lit_Chars val:'\tgit update-index --add path0 path1\n' span_id:65)
        )
      }
    )
    (C {(mv)} {(path0)} {(path0-)})
    (command.Simple
      words: [{(sed)} {(-e)} {(SQ (Token id:Id.Lit_Chars val:s/line/Line/ span_id:80))}]
      redirects: [
        (redir.Redir op:(Token id:Id.Redir_Less val:'<' span_id:83) fd:-1 arg_word:{(path0-)})
        (redir.Redir op:(Token id:Id.Redir_Great val:'>' span_id:86) fd:-1 arg_word:{(path0)})
      ]
    )
    (C {(chmod)} {(Id.Lit_Other '+') (x)} {(path0)})
    (C {(rm)} {(-f)} {(path1)})
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'git diff-files -p after editing work tree.' span_id:105))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:109) 
          (Token id:Id.Lit_Chars val:'\tgit diff-files -p >actual\n' span_id:110)
        )
      }
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (C {(Id.Lit_LBracket '[')} 
              {
                (DQ 
                  (command_sub
                    left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:122)
                    command_list: 
                      (command.CommandList
                        children: [(C {(git)} {(config)} {(--get)} {(core.filemode)})]
                      )
                  )
                )
              } {(Id.Lit_Equals '=')} {(false)} {(Id.Lit_RBracket ']')}
            )
          ]
          action: [
            (C {(say)} 
              {(SQ (Token id:Id.Lit_Chars val:'filemode disabled on the filesystem' span_id:145))}
            )
            (C {(test_done)})
          ]
          spids: [117 139]
        )
      ]
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:156)
          fd: -1
          arg_word: {(expected)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:159)
          fd: -1
          here_begin: 
            {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:160)) 
              (OF)
            }
          here_end_span_id: 181
          stdin_parts: [
            ('diff --git a/path0 b/path0\n')
            ('old mode 100644\n')
            ('new mode 100755\n')
            ('--- a/path0\n')
            ('+++ b/path0\n')
            ('@@ -1,3 +1,3 @@\n')
            (' Line 1\n')
            (' Line 2\n')
            ('-line 3\n')
            ('+Line 3\n')
            ('diff --git a/path1 b/path1\n')
            ('deleted file mode 100755\n')
            ('--- a/path1\n')
            ('+++ /dev/null\n')
            ('@@ -1,3 +0,0 @@\n')
            ('-Line 1\n')
            ('-Line 2\n')
            ('-line 3\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'validate git diff-files -p output.' span_id:186))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:190) 
          (Token id:Id.Lit_Chars val:'\tcompare_diff_patch expected actual\n' span_id:191)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'git diff-files -s after editing work tree' span_id:198))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:202) 
          (Token id:Id.Lit_Chars val:'\tgit diff-files -s >actual 2>err &&\n' span_id:203) (Token id:Id.Lit_Chars val:'\ttest_must_be_empty actual &&\n' span_id:204) 
          (Token id:Id.Lit_Chars val:'\ttest_must_be_empty err\n' span_id:205)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'git diff-files --no-patch as synonym for -s' span_id:212))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:216) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit diff-files --no-patch >actual 2>err &&\n'
            span_id: 217
          ) (Token id:Id.Lit_Chars val:'\ttest_must_be_empty actual &&\n' span_id:218) 
          (Token id:Id.Lit_Chars val:'\ttest_must_be_empty err\n' span_id:219)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'git diff-files --no-patch --patch shows the patch'
            span_id: 226
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:230) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit diff-files --no-patch --patch >actual &&\n'
            span_id: 231
          ) (Token id:Id.Lit_Chars val:'\tcompare_diff_patch expected actual\n' span_id:232)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'git diff-files --no-patch --patch-with-raw shows the patch and raw data'
            span_id: 239
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:243) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit diff-files --no-patch --patch-with-raw >actual &&\n'
            span_id: 244
          ) 
          (Token
            id: Id.Lit_Chars
            val: 
'\tgrep -q "^:100644 100755 .* 0000000000000000000000000000000000000000 M\tpath0\\$" actual &&\n'
            span_id: 245
          ) (Token id:Id.Lit_Chars val:'\ttail -n +4 actual >actual-patch &&\n' span_id:246) 
          (Token
            id: Id.Lit_Chars
            val: '\tcompare_diff_patch expected actual-patch\n'
            span_id: 247
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'git diff-files --patch --no-patch does not show the patch'
            span_id: 254
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:258) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit diff-files --patch --no-patch >actual 2>err &&\n'
            span_id: 259
          ) (Token id:Id.Lit_Chars val:'\ttest_must_be_empty actual &&\n' span_id:260) 
          (Token id:Id.Lit_Chars val:'\ttest_must_be_empty err\n' span_id:261)
        )
      }
    )
    (C {(test_done)})
  ]
)