(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'combined and merge diff handle binary files and textconv'>)}
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (C {(test_expect_success)} {(SQ <'setup binary merge conflict'>)} 
      {
        (SQ <'\n'> <'\techo oneQ1 | q_to_nul >binary &&\n'> <'\tgit add binary &&\n'> 
          <'\tgit commit -m one &&\n'> <'\techo twoQ2 | q_to_nul >binary &&\n'> <'\tgit commit -a -m two &&\n'> 
          <'\tgit checkout -b branch-binary HEAD^ &&\n'> <'\techo threeQ3 | q_to_nul >binary &&\n'> <'\tgit commit -a -m three &&\n'> 
          <'\ttest_must_fail git merge master &&\n'> <'\techo resolvedQhooray | q_to_nul >binary &&\n'> <'\tgit commit -a -m resolved\n'>
        )
      }
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(SQ <EOF>)}
          here_end_span_id: 56
          stdin_parts: [
            ('resolved\n')
            ('\n')
            ('diff --git a/binary b/binary\n')
            ('index 7ea6ded..9563691 100644\n')
            ('Binary files a/binary and b/binary differ\n')
            ('resolved\n')
            ('\n')
            ('diff --git a/binary b/binary\n')
            ('index 6197570..9563691 100644\n')
            ('Binary files a/binary and b/binary differ\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'diff -m indicates binary-ness'>)} 
      {(SQ <'\n'> <'\tgit show --format=%s -m >actual &&\n'> <'\ttest_cmp expect actual\n'>)}
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(SQ <EOF>)}
          here_end_span_id: 85
          stdin_parts: [
            ('resolved\n')
            ('\n')
            ('diff --combined binary\n')
            ('index 7ea6ded,6197570..9563691\n')
            ('Binary files differ\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'diff -c indicates binary-ness'>)} 
      {(SQ <'\n'> <'\tgit show --format=%s -c >actual &&\n'> <'\ttest_cmp expect actual\n'>)}
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(SQ <EOF>)}
          here_end_span_id: 114
          stdin_parts: [
            ('resolved\n')
            ('\n')
            ('diff --cc binary\n')
            ('index 7ea6ded,6197570..9563691\n')
            ('Binary files differ\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'diff --cc indicates binary-ness'>)} 
      {(SQ <'\n'> <'\tgit show --format=%s --cc >actual &&\n'> <'\ttest_cmp expect actual\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'setup non-binary with binary attribute'>)} 
      {
        (SQ <'\n'> <'\tgit checkout master &&\n'> <'\ttest_commit one text &&\n'> 
          <'\ttest_commit two text &&\n'> <'\tgit checkout -b branch-text HEAD^ &&\n'> <'\ttest_commit three text &&\n'> 
          <'\ttest_must_fail git merge master &&\n'> <'\ttest_commit resolved text &&\n'> <'\techo text -diff >.gitattributes\n'>
        )
      }
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(SQ <EOF>)}
          here_end_span_id: 167
          stdin_parts: [
            ('resolved\n')
            ('\n')
            ('diff --git a/text b/text\n')
            ('index 2bdf67a..2ab19ae 100644\n')
            ('Binary files a/text and b/text differ\n')
            ('resolved\n')
            ('\n')
            ('diff --git a/text b/text\n')
            ('index f719efd..2ab19ae 100644\n')
            ('Binary files a/text and b/text differ\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'diff -m respects binary attribute'>)} 
      {(SQ <'\n'> <'\tgit show --format=%s -m >actual &&\n'> <'\ttest_cmp expect actual\n'>)}
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(SQ <EOF>)}
          here_end_span_id: 196
          stdin_parts: [
            ('resolved\n')
            ('\n')
            ('diff --combined text\n')
            ('index 2bdf67a,f719efd..2ab19ae\n')
            ('Binary files differ\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'diff -c respects binary attribute'>)} 
      {(SQ <'\n'> <'\tgit show --format=%s -c >actual &&\n'> <'\ttest_cmp expect actual\n'>)}
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(SQ <EOF>)}
          here_end_span_id: 225
          stdin_parts: [
            ('resolved\n')
            ('\n')
            ('diff --cc text\n')
            ('index 2bdf67a,f719efd..2ab19ae\n')
            ('Binary files differ\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'diff --cc respects binary attribute'>)} 
      {(SQ <'\n'> <'\tgit show --format=%s --cc >actual &&\n'> <'\ttest_cmp expect actual\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'setup textconv attribute'>)} 
      {
        (SQ <'\n'> <'\techo "text diff=upcase" >.gitattributes &&\n'> 
          <'\tgit config diff.upcase.textconv "tr a-z A-Z <"\n'>
        )
      }
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(SQ <EOF>)}
          here_end_span_id: 280
          stdin_parts: [
            ('resolved\n')
            ('\n')
            ('diff --git a/text b/text\n')
            ('index 2bdf67a..2ab19ae 100644\n')
            ('--- a/text\n')
            ('+++ b/text\n')
            ('@@ -1 +1 @@\n')
            ('-THREE\n')
            ('+RESOLVED\n')
            ('resolved\n')
            ('\n')
            ('diff --git a/text b/text\n')
            ('index f719efd..2ab19ae 100644\n')
            ('--- a/text\n')
            ('+++ b/text\n')
            ('@@ -1 +1 @@\n')
            ('-TWO\n')
            ('+RESOLVED\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'diff -m respects textconv attribute'>)} 
      {(SQ <'\n'> <'\tgit show --format=%s -m >actual &&\n'> <'\ttest_cmp expect actual\n'>)}
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(SQ <EOF>)}
          here_end_span_id: 314
          stdin_parts: [
            ('resolved\n')
            ('\n')
            ('diff --combined text\n')
            ('index 2bdf67a,f719efd..2ab19ae\n')
            ('--- a/text\n')
            ('+++ b/text\n')
            ('@@@ -1,1 -1,1 +1,1 @@@\n')
            ('- THREE\n')
            (' -TWO\n')
            ('++RESOLVED\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'diff -c respects textconv attribute'>)} 
      {(SQ <'\n'> <'\tgit show --format=%s -c >actual &&\n'> <'\ttest_cmp expect actual\n'>)}
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(SQ <EOF>)}
          here_end_span_id: 348
          stdin_parts: [
            ('resolved\n')
            ('\n')
            ('diff --cc text\n')
            ('index 2bdf67a,f719efd..2ab19ae\n')
            ('--- a/text\n')
            ('+++ b/text\n')
            ('@@@ -1,1 -1,1 +1,1 @@@\n')
            ('- THREE\n')
            (' -TWO\n')
            ('++RESOLVED\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'diff --cc respects textconv attribute'>)} 
      {(SQ <'\n'> <'\tgit show --format=%s --cc >actual &&\n'> <'\ttest_cmp expect actual\n'>)}
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(SQ <EOF>)}
          here_end_span_id: 380
          stdin_parts: [
            ('diff --combined text\n')
            ('index 2bdf67a,f719efd..2ab19ae\n')
            ('--- a/text\n')
            ('+++ b/text\n')
            ('@@@ -1,1 -1,1 +1,1 @@@\n')
            ('- three\n')
            (' -two\n')
            ('++resolved\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'diff-tree plumbing does not respect textconv'>)} 
      {
        (SQ <'\n'> <'\tgit diff-tree HEAD -c -p >full &&\n'> <'\ttail -n +2 full >actual &&\n'> 
          <'\ttest_cmp expect actual\n'>
        )
      }
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(SQ <EOF>)}
          here_end_span_id: 415
          stdin_parts: [
            ('diff --cc text\n')
            ('index 2bdf67a,f719efd..0000000\n')
            ('--- a/text\n')
            ('+++ b/text\n')
            ('@@@ -1,1 -1,1 +1,5 @@@\n')
            ('++<<<<<<< HEAD\n')
            (' +THREE\n')
            ('++=======\n')
            ('+ TWO\n')
            ('++>>>>>>> MASTER\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'diff --cc respects textconv on worktree file'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard HEAD^ &&\n'> <'\ttest_must_fail git merge master &&\n'> 
          <'\tgit diff >actual &&\n'> <'\ttest_cmp expect actual\n'>
        )
      }
    )
    (C {(test_done)})
  ]
)