(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'Test built-in diff output engine.\n'> <'\n'>)}
          spids: [13]
        )
      ]
    )
    (C {<.>} {<'./test-lib.sh'>})
    (C {<.>} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) <'/diff-lib.sh'>})
    (command.Simple
      words: [{<echo>} {(SQ <'Line 1\n'> <'Line 2\n'> <'line 3'>)}]
      redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<path0>})]
      do_fork: T
    )
    (command.Simple
      words: [{<cat>} {<path0>}]
      redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<path1>})]
      do_fork: T
    )
    (C {<chmod>} {<Id.Lit_Other '+'> <x>} {<path1>})
    (C {<test_expect_success>} {(SQ <'update-index --add two files with and without +x.'>)} 
      {(SQ <'\n'> <'\tgit update-index --add path0 path1\n'>)}
    )
    (C {<mv>} {<path0>} {<path0->})
    (command.Simple
      words: [{<sed>} {<-e>} {(SQ <'s/line/Line/'>)}]
      redirects: [
        (redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<path0->})
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<path0>})
      ]
      do_fork: T
    )
    (C {<chmod>} {<Id.Lit_Other '+'> <x>} {<path0>})
    (C {<rm>} {<-f>} {<path1>})
    (C {<test_expect_success>} {(SQ <'git diff-files -p after editing work tree.'>)} 
      {(SQ <'\n'> <'\tgit diff-files -p >actual\n'>)}
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<Id.Lit_LBracket '['>} 
                  {
                    (DQ 
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<git>} {<config>} {<--get>} {<core.filemode>})
                      )
                    )
                  } {<Id.Lit_Equals '='>} {<false>} {<Id.Lit_RBracket ']'>}
                )
              ]
            )
          action: [(C {<say>} {(SQ <'filemode disabled on the filesystem'>)}) (C {<test_done>})]
          spids: [117 139]
        )
      ]
    )
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>})
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'>) <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'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (C {<test_expect_success>} {(SQ <'validate git diff-files -p output.'>)} 
      {(SQ <'\n'> <'\tcompare_diff_patch expected actual\n'>)}
    )
    (C {<test_expect_success>} {(SQ <'git diff-files -s after editing work tree'>)} 
      {
        (SQ <'\n'> <'\tgit diff-files -s >actual 2>err &&\n'> <'\ttest_must_be_empty actual &&\n'> 
          <'\ttest_must_be_empty err\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'git diff-files --no-patch as synonym for -s'>)} 
      {
        (SQ <'\n'> <'\tgit diff-files --no-patch >actual 2>err &&\n'> 
          <'\ttest_must_be_empty actual &&\n'> <'\ttest_must_be_empty err\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'git diff-files --no-patch --patch shows the patch'>)} 
      {
        (SQ <'\n'> <'\tgit diff-files --no-patch --patch >actual &&\n'> 
          <'\tcompare_diff_patch expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} 
      {(SQ <'git diff-files --no-patch --patch-with-raw shows the patch and raw data'>)} 
      {
        (SQ <'\n'> <'\tgit diff-files --no-patch --patch-with-raw >actual &&\n'> 
          <
'\tgrep -q "^:100644 100755 .* 0000000000000000000000000000000000000000 M\tpath0\\$" actual &&\n'
          > <'\ttail -n +4 actual >actual-patch &&\n'> <'\tcompare_diff_patch expected actual-patch\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'git diff-files --patch --no-patch does not show the patch'>)} 
      {
        (SQ <'\n'> <'\tgit diff-files --patch --no-patch >actual 2>err &&\n'> 
          <'\ttest_must_be_empty actual &&\n'> <'\ttest_must_be_empty err\n'>
        )
      }
    )
    (C {<test_done>})
  ]
)