(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'git cat-file textconv support'>)}
          spids: [4]
        )
      ]
    )
    (C {<.>} {<'./test-lib.sh'>})
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<helper>})
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {(SQ <EOF>)}
              here_end_span_id: 27
              stdin_parts: [
                <'#!/bin/sh\n'>
                <
'grep -q \'^bin: \' "$1" || { echo "E: $1 is not \\"binary\\" file" 1>&2; exit 1; }\n'
                >
                <'sed \'s/^bin: /converted: /\' "$1"\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (C {<chmod>} {<Id.Lit_Other '+'> <x>} {<helper>})
    (C {<test_expect_success>} {(SQ <'setup '>)} 
      {
        (SQ <'\n'> <'\techo "bin: test" >one.bin &&\n'> <'\ttest_ln_s_add one.bin symlink.bin &&\n'> 
          <'\tgit add . &&\n'> <'\tGIT_AUTHOR_NAME=Number1 git commit -a -m First --date="2010-01-01 18:00:00" &&\n'> 
          <'\techo "bin: test version 2" >one.bin &&\n'> <'\tGIT_AUTHOR_NAME=Number2 git commit -a -m Second --date="2010-01-01 20:00:00"\n'>
        )
      }
    )
    (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: {<EOF>}
              here_end_span_id: 63
              stdin_parts: [<'bin: test version 2\n'>]
            )
        )
      ]
      do_fork: T
    )
    (C {<test_expect_success>} {(SQ <'no filter specified'>)} 
      {
        (SQ <'\n'> <'\tgit cat-file --textconv :one.bin >result &&\n'> <'\ttest_cmp expected result\n'>)
      }
    )
    (C {<test_expect_success>} {(SQ <'setup textconv filters'>)} 
      {
        (SQ <'\n'> <'\techo "*.bin diff=test" >.gitattributes &&\n'> 
          <'\tgit config diff.test.textconv ./helper &&\n'> <'\tgit config diff.test.cachetextconv false\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'cat-file without --textconv'>)} 
      {(SQ <'\n'> <'\tgit cat-file blob :one.bin >result &&\n'> <'\ttest_cmp expected result\n'>)}
    )
    (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: {<EOF>}
              here_end_span_id: 115
              stdin_parts: [<'bin: test\n'>]
            )
        )
      ]
      do_fork: T
    )
    (C {<test_expect_success>} {(SQ <'cat-file without --textconv on previous commit'>)} 
      {(SQ <'\n'> <'\tgit cat-file -p HEAD^:one.bin >result &&\n'> <'\ttest_cmp expected result\n'>)}
    )
    (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: {<EOF>}
              here_end_span_id: 140
              stdin_parts: [<'converted: test version 2\n'>]
            )
        )
      ]
      do_fork: T
    )
    (C {<test_expect_success>} {(SQ <'cat-file --textconv on last commit'>)} 
      {
        (SQ <'\n'> <'\tgit cat-file --textconv :one.bin >result &&\n'> <'\ttest_cmp expected result\n'>)
      }
    )
    (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: {<EOF>}
              here_end_span_id: 165
              stdin_parts: [<'converted: test\n'>]
            )
        )
      ]
      do_fork: T
    )
    (C {<test_expect_success>} {(SQ <'cat-file --textconv on previous commit'>)} 
      {
        (SQ <'\n'> <'\tgit cat-file --textconv HEAD^:one.bin >result &&\n'> 
          <'\ttest_cmp expected result\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'cat-file without --textconv (symlink)'>)} 
      {
        (SQ <'\n'> <'\tprintf "%s" "one.bin" >expected &&\n'> 
          <'\tgit cat-file blob :symlink.bin >result &&\n'> <'\ttest_cmp expected result\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'cat-file --textconv on index (symlink)'>)} 
      {
        (SQ <'\n'> <'\tgit cat-file --textconv :symlink.bin >result &&\n'> 
          <'\ttest_cmp expected result\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'cat-file --textconv on HEAD (symlink)'>)} 
      {
        (SQ <'\n'> <'\tgit cat-file --textconv HEAD:symlink.bin >result &&\n'> 
          <'\ttest_cmp expected result\n'>
        )
      }
    )
    (C {<test_done>})
  ]
)