(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'test conversion filters on large files'>)}
          spids: [4]
        )
      ]
      spids: [4]
    )
    (C {(.)} {(./test-lib.sh)})
    (FuncDef
      name: set_attr
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test_when_finished)} {(SQ <'rm -f .gitattributes'>)})
                (SimpleCommand
                  words: [{(echo)} {(DQ ('* ') ($ VSub_Star '$*'))}]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: 16777215
                      arg_word: {(.gitattributes)}
                      spids: [37]
                    )
                  ]
                )
              ]
            )
          ]
          spids: [18]
        )
      spids: [14 17]
    )
    (FuncDef
      name: check_input
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp]
              children: [
                (C {(git)} {(read-tree)} {(--empty)})
                (C {(git)} {(add)} {(small)} {(large)})
                (SimpleCommand
                  words: [{(git)} {(cat-file)} {(blob)} {(Lit_Other ':') (small)}]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: 16777215
                      arg_word: {(small.index)}
                      spids: [79]
                    )
                  ]
                )
                (Pipeline
                  children: [
                    (C {(git)} {(cat-file)} {(blob)} {(Lit_Other ':') (large)})
                    (SimpleCommand
                      words: [{(head)} {(-n)} {(1)}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(large.index)}
                          spids: [102]
                        )
                      ]
                    )
                  ]
                  negated: F
                )
                (C {(test_cmp)} {(small.index)} {(large.index)})
              ]
            )
          ]
          spids: [47]
        )
      spids: [43 46]
    )
    (FuncDef
      name: check_output
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DAmp Op_DAmp Op_DAmp]
              children: [
                (C {(rm)} {(-f)} {(small)} {(large)})
                (C {(git)} {(checkout)} {(small)} {(large)})
                (SimpleCommand
                  words: [{(head)} {(-n)} {(1)} {(large)}]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: 16777215
                      arg_word: {(large.head)}
                      spids: [154]
                    )
                  ]
                )
                (C {(test_cmp)} {(small)} {(large.head)})
              ]
            )
          ]
          spids: [121]
        )
      spids: [117 120]
    )
    (C {(test_expect_success)} {(SQ <'setup input tests'>)} 
      {
        (SQ <'\n'> <'\tprintf "\\$Id: foo\\$\\\\r\\\\n" >small &&\n'> <'\tcat small small >large &&\n'> 
          <'\tgit config core.bigfilethreshold 20 &&\n'> <'\tgit config filter.test.clean "sed s/.*/CLEAN/"\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'autocrlf=true converts on input'>)} 
      {(SQ <'\n'> <'\ttest_config core.autocrlf true &&\n'> <'\tcheck_input\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'eol=crlf converts on input'>)} 
      {(SQ <'\n'> <'\tset_attr eol=crlf &&\n'> <'\tcheck_input\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'ident converts on input'>)} 
      {(SQ <'\n'> <'\tset_attr ident &&\n'> <'\tcheck_input\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'user-defined filters convert on input'>)} 
      {(SQ <'\n'> <'\tset_attr filter=test &&\n'> <'\tcheck_input\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'setup output tests'>)} 
      {
        (SQ <'\n'> <'\techo "\\$Id\\$" >small &&\n'> <'\tcat small small >large &&\n'> 
          <'\tgit add small large &&\n'> <'\tgit config core.bigfilethreshold 7 &&\n'> <'\tgit config filter.test.smudge "sed s/.*/SMUDGE/"\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'autocrlf=true converts on output'>)} 
      {(SQ <'\n'> <'\ttest_config core.autocrlf true &&\n'> <'\tcheck_output\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'eol=crlf converts on output'>)} 
      {(SQ <'\n'> <'\tset_attr eol=crlf &&\n'> <'\tcheck_output\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'user-defined filters convert on output'>)} 
      {(SQ <'\n'> <'\tset_attr filter=test &&\n'> <'\tcheck_output\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'ident converts on output'>)} 
      {
        (SQ <'\n'> <'\tset_attr ident &&\n'> <'\trm -f small large &&\n'> 
          <'\tgit checkout small large &&\n'> <'\tsed -n "s/Id: .*/Id: SHA/p" <small >small.clean &&\n'> <'\thead -n 1 large >large.head &&\n'> 
          <'\tsed -n "s/Id: .*/Id: SHA/p" <large.head >large.clean &&\n'> <'\ttest_cmp small.clean large.clean\n'>
        )
      }
    )
    (C {(test_done)})
  ]
)