(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'diff.*.textconv tests'>)}
          spids: [4]
        )
      ]
      spids: [4]
    )
    (C {(.)} {(./test-lib.sh)})
    (FuncDef
      name: find_diff
      body: 
        (BraceGroup
          children: [
            (Pipeline
              children: [(C {(sed)} {(SQ <'1,/^index /d'>)}) (C {(sed)} {(SQ <'/^-- $/,$d'>)})]
              negated: F
            )
          ]
          spids: [18]
        )
      spids: [14 17]
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:16777215 arg_word:{(expect.binary)} spids:[40])
        (HereDoc
          op_id: Redir_DLess
          fd: 16777215
          body: {('Binary files a/file and b/file differ\n')}
          do_expansion: False
          here_end: EOF
          was_filled: T
          spids: [43]
        )
      ]
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:16777215 arg_word:{(expect.text)} spids:[51])
        (HereDoc
          op_id: Redir_DLess
          fd: 16777215
          body: {('--- a/file\n') ('+++ b/file\n') ('@@ -1 +1,2 @@\n') (' 0\n') ('+1\n')}
          do_expansion: False
          here_end: EOF
          was_filled: T
          spids: [54]
        )
      ]
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:16777215 arg_word:{(hexdump)} spids:[62])
        (HereDoc
          op_id: Redir_DLess
          fd: 16777215
          body: 
            {('#!/bin/sh\n') 
              ('"$PERL_PATH" -e \'$/ = undef; $_ = <>; s/./ord($&)/ge; print $_\' < "$1"\n')
            }
          do_expansion: False
          here_end: EOF
          was_filled: T
          spids: [65]
        )
      ]
    )
    (C {(chmod)} {(Lit_Other '+') (x)} {(hexdump)})
    (C {(test_expect_success)} {(SQ <'setup binary file with history'>)} 
      {
        (SQ <'\n'> <'\tprintf "\\\\0\\\\n" >file &&\n'> <'\tgit add file &&\n'> 
          <'\tgit commit -m one &&\n'> <'\tprintf "\\\\01\\\\n" >>file &&\n'> <'\tgit add file &&\n'> <'\tgit commit -m two\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'file is considered binary by porcelain'>)} 
      {
        (SQ <'\n'> <'\tgit diff HEAD^ HEAD >diff &&\n'> <'\tfind_diff <diff >actual &&\n'> 
          <'\ttest_cmp expect.binary actual\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'file is considered binary by plumbing'>)} 
      {
        (SQ <'\n'> <'\tgit diff-tree -p HEAD^ HEAD >diff &&\n'> <'\tfind_diff <diff >actual &&\n'> 
          <'\ttest_cmp expect.binary actual\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'setup textconv filters'>)} 
      {
        (SQ <'\n'> <'\techo file diff=foo >.gitattributes &&\n'> 
          <'\tgit config diff.foo.textconv "\\"$(pwd)\\""/hexdump &&\n'> <'\tgit config diff.fail.textconv false\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'diff produces text'>)} 
      {
        (SQ <'\n'> <'\tgit diff HEAD^ HEAD >diff &&\n'> <'\tfind_diff <diff >actual &&\n'> 
          <'\ttest_cmp expect.text actual\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'show commit produces text'>)} 
      {
        (SQ <'\n'> <'\tgit show HEAD >diff &&\n'> <'\tfind_diff <diff >actual &&\n'> 
          <'\ttest_cmp expect.text actual\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'diff-tree produces binary'>)} 
      {
        (SQ <'\n'> <'\tgit diff-tree -p HEAD^ HEAD >diff &&\n'> <'\tfind_diff <diff >actual &&\n'> 
          <'\ttest_cmp expect.binary actual\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'log produces text'>)} 
      {
        (SQ <'\n'> <'\tgit log -1 -p >log &&\n'> <'\tfind_diff <log >actual &&\n'> 
          <'\ttest_cmp expect.text actual\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'format-patch produces binary'>)} 
      {
        (SQ <'\n'> <'\tgit format-patch --no-binary --stdout HEAD^ >patch &&\n'> 
          <'\tfind_diff <patch >actual &&\n'> <'\ttest_cmp expect.binary actual\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'status -v produces text'>)} 
      {
        (SQ <'\n'> <'\tgit reset --soft HEAD^ &&\n'> <'\tgit status -v >diff &&\n'> 
          <'\tfind_diff <diff >actual &&\n'> <'\ttest_cmp expect.text actual &&\n'> <'\tgit reset --soft HEAD@{1}\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'show blob produces binary'>)} 
      {
        (SQ <'\n'> <'\tgit show HEAD:file >actual &&\n'> 
          <'\tprintf "\\\\0\\\\n\\\\01\\\\n" >expect &&\n'> <'\ttest_cmp expect actual\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'show --textconv blob produces text'>)} 
      {
        (SQ <'\n'> <'\tgit show --textconv HEAD:file >actual &&\n'> 
          <'\tprintf "0\\\\n1\\\\n" >expect &&\n'> <'\ttest_cmp expect actual\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'show --no-textconv blob produces binary'>)} 
      {
        (SQ <'\n'> <'\tgit show --no-textconv HEAD:file >actual &&\n'> 
          <'\tprintf "\\\\0\\\\n\\\\01\\\\n" >expect &&\n'> <'\ttest_cmp expect actual\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'grep-diff (-G) operates on textconv data (add)'>)} 
      {
        (SQ <'\n'> <'\techo one >expect &&\n'> <'\tgit log --root --format=%s -G0 >actual &&\n'> 
          <'\ttest_cmp expect actual\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'grep-diff (-G) operates on textconv data (modification)'>)} 
      {
        (SQ <'\n'> <'\techo two >expect &&\n'> <'\tgit log --root --format=%s -G1 >actual &&\n'> 
          <'\ttest_cmp expect actual\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'pickaxe (-S) operates on textconv data (add)'>)} 
      {
        (SQ <'\n'> <'\techo one >expect &&\n'> <'\tgit log --root --format=%s -S0 >actual &&\n'> 
          <'\ttest_cmp expect actual\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'pickaxe (-S) operates on textconv data (modification)'>)} 
      {
        (SQ <'\n'> <'\techo two >expect &&\n'> <'\tgit log --root --format=%s -S1 >actual &&\n'> 
          <'\ttest_cmp expect actual\n'>
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:16777215 arg_word:{(expect.stat)} spids:[323])
        (HereDoc
          op_id: Redir_DLess
          fd: 16777215
          body: 
            {(' file | Bin 2 -> 4 bytes\n') (' 1 file changed, 0 insertions(+), 0 deletions(-)\n')}
          do_expansion: False
          here_end: EOF
          was_filled: T
          spids: [326]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'diffstat does not run textconv'>)} 
      {
        (SQ <'\n'> <'\techo file diff=fail >.gitattributes &&\n'> 
          <'\tgit diff --stat HEAD^ HEAD >actual &&\n'> <'\ttest_i18ncmp expect.stat actual &&\n'> <'\n'> <'\thead -n1 <expect.stat >expect.line1 &&\n'> 
          <'\thead -n1 <actual >actual.line1 &&\n'> <'\ttest_cmp expect.line1 actual.line1\n'>
        )
      }
    )
    (SimpleCommand
      words: [{(echo)} {(file)} {(Lit_VarLike 'diff=') (foo)}]
      redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(.gitattributes)} spids:[358])]
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:16777215 arg_word:{(expect.typechange)} spids:[364])
        (HereDoc
          op_id: Redir_DLess
          fd: 16777215
          body: 
            {('--- a/file\n') ('+++ /dev/null\n') ('@@ -1,2 +0,0 @@\n') ('-0\n') ('-1\n') 
              ('diff --git a/file b/file\n') ('new file mode 120000\n') ('index 0000000..67be421\n') ('--- /dev/null\n') ('+++ b/file\n') 
              ('@@ -0,0 +1 @@\n') ('+frotz\n') ('\\ No newline at end of file\n')
            }
          do_expansion: False
          here_end: EOF
          was_filled: T
          spids: [367]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'textconv does not act on symlinks'>)} 
      {
        (SQ <'\n'> <'\trm -f file &&\n'> <'\ttest_ln_s_add frotz file &&\n'> 
          <'\tgit commit -m typechange &&\n'> <'\tgit show >diff &&\n'> <'\tfind_diff <diff >actual &&\n'> <'\ttest_cmp expect.typechange actual\n'>
        )
      }
    )
    (C {(test_done)})
  ]
)