(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'git cat-file filters support'>)}
          spids: [4]
        )
      ]
      spids: [4]
    )
    (C {(.)} {(./test-lib.sh)})
    (C {(test_expect_success)} {(SQ <'setup '>)} 
      {
        (SQ <'\n'> <'\techo "*.txt eol=crlf diff=txt" >.gitattributes &&\n'> 
          <'\techo "hello" | append_cr >world.txt &&\n'> <'\tgit add .gitattributes world.txt &&\n'> <'\ttest_tick &&\n'> <'\tgit commit -m "Initial commit"\n'>
        )
      }
    )
    (FuncDef
      name: has_cr
      body: 
        (BraceGroup
          children: [
            (Pipeline
              children: [
                (SimpleCommand
                  words: [{(tr)} {(SQ <'\\015'>)} {(Q)}]
                  redirects: [
                    (Redir
                      op_id: Redir_Less
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_Number '$1'))}
                      spids: [46]
                    )
                  ]
                )
                (SimpleCommand
                  words: [{(grep)} {(Q)}]
                  redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[57])]
                )
              ]
              negated: F
            )
          ]
          spids: [35]
        )
      spids: [30 34]
    )
    (C {(test_expect_success)} {(SQ <'no filters with `git show`'>)} 
      {(SQ <'\n'> <'\tgit show HEAD:world.txt >actual &&\n'> <'\t! has_cr actual\n'> <'\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'no filters with cat-file'>)} 
      {(SQ <'\n'> <'\tgit cat-file blob HEAD:world.txt >actual &&\n'> <'\t! has_cr actual\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'cat-file --filters converts to worktree version'>)} 
      {(SQ <'\n'> <'\tgit cat-file --filters HEAD:world.txt >actual &&\n'> <'\thas_cr actual\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'cat-file --filters --path=<path> works'>)} 
      {
        (SQ <'\n'> <'\tsha1=$(git rev-parse -q --verify HEAD:world.txt) &&\n'> 
          <'\tgit cat-file --filters --path=world.txt $sha1 >actual &&\n'> <'\thas_cr actual\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'cat-file --textconv --path=<path> works'>)} 
      {
        (SQ <'\n'> <'\tsha1=$(git rev-parse -q --verify HEAD:world.txt) &&\n'> 
          <'\ttest_config diff.txt.textconv "tr A-Za-z N-ZA-Mn-za-m <" &&\n'> <'\tgit cat-file --textconv --path=hello.txt $sha1 >rot13 &&\n'> 
          <'\ttest uryyb = "$(cat rot13 | remove_cr)"\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'--path=<path> complains without --textconv/--filters'>)} 
      {
        (SQ <'\n'> <'\tsha1=$(git rev-parse -q --verify HEAD:world.txt) &&\n'> 
          <'\ttest_must_fail git cat-file --path=hello.txt blob $sha1 >actual 2>err &&\n'> <'\ttest ! -s actual &&\n'> <'\tgrep "path.*needs.*filters" err\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'cat-file --textconv --batch works'>)} 
      {
        (SQ <'\n'> <'\tsha1=$(git rev-parse -q --verify HEAD:world.txt) &&\n'> 
          <'\ttest_config diff.txt.textconv "tr A-Za-z N-ZA-Mn-za-m <" &&\n'> <'\tprintf "%s hello.txt\\n%s hello\\n" $sha1 $sha1 |\n'> 
          <'\tgit cat-file --textconv --batch >actual &&\n'> <'\tprintf "%s blob 6\\nuryyb\\r\\n\\n%s blob 6\\nhello\\n\\n" \\\n'> <'\t\t$sha1 $sha1 >expect &&\n'> 
          <'\ttest_cmp expect actual\n'>
        )
      }
    )
    (C {(test_done)})
  ]
)