(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'test conversion filters on large files'>)}
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.FuncDef
      name: set_attr
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test_when_finished)} {(SQ <'rm -f .gitattributes'>)})
                (command.SimpleCommand
                  words: [{(echo)} {(DQ ('* ') ($ VSub_Star '$*'))}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(.gitattributes)}
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: check_input
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp]
              children: [
                (C {(git)} {(read-tree)} {(--empty)})
                (C {(git)} {(add)} {(small)} {(large)})
                (command.SimpleCommand
                  words: [{(git)} {(cat-file)} {(blob)} {(Lit_Other ':') (small)}]
                  redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(small.index)})]
                )
                (command.Pipeline
                  children: [
                    (C {(git)} {(cat-file)} {(blob)} {(Lit_Other ':') (large)})
                    (command.SimpleCommand
                      words: [{(head)} {(-n)} {(1)}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {(large.index)}
                        )
                      ]
                    )
                  ]
                  negated: F
                )
                (C {(test_cmp)} {(small.index)} {(large.index)})
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: check_output
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp Op_DAmp Op_DAmp]
              children: [
                (C {(rm)} {(-f)} {(small)} {(large)})
                (C {(git)} {(checkout)} {(small)} {(large)})
                (command.SimpleCommand
                  words: [{(head)} {(-n)} {(1)} {(large)}]
                  redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(large.head)})]
                )
                (C {(test_cmp)} {(small)} {(large.head)})
              ]
            )
          ]
        )
    )
    (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)})
  ]
)