(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ (Token id:Id.Lit_Chars val:'test conversion filters on large files' span_id:6))}
          spids: [4]
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.ShFunction
      name: set_attr
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(test_when_finished)} 
                  {(SQ (Token id:Id.Lit_Chars val:'rm -f .gitattributes' span_id:24))}
                )
                (command.Simple
                  words: [{(echo)} {(DQ ('* ') ($ Id.VSub_Star '$*'))}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'>' span_id:37)
                      fd: -1
                      arg_word: {(.gitattributes)}
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: check_input
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp]
              children: [
                (C {(git)} {(read-tree)} {(--empty)})
                (C {(git)} {(add)} {(small)} {(large)})
                (command.Simple
                  words: [{(git)} {(cat-file)} {(blob)} {(Id.Lit_Other ':') (small)}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'>' span_id:79)
                      fd: -1
                      arg_word: {(small.index)}
                    )
                  ]
                )
                (command.Pipeline
                  children: [
                    (C {(git)} {(cat-file)} {(blob)} {(Id.Lit_Other ':') (large)})
                    (command.Simple
                      words: [{(head)} {(-n)} {(1)}]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_Great val:'>' span_id:102)
                          fd: -1
                          arg_word: {(large.index)}
                        )
                      ]
                    )
                  ]
                  negated: F
                )
                (C {(test_cmp)} {(small.index)} {(large.index)})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: check_output
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp]
              children: [
                (C {(rm)} {(-f)} {(small)} {(large)})
                (C {(git)} {(checkout)} {(small)} {(large)})
                (command.Simple
                  words: [{(head)} {(-n)} {(1)} {(large)}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'>' span_id:154)
                      fd: -1
                      arg_word: {(large.head)}
                    )
                  ]
                )
                (C {(test_cmp)} {(small)} {(large.head)})
              ]
            )
          ]
        )
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'setup input tests' span_id:172))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:176) 
          (Token
            id: Id.Lit_Chars
            val: '\tprintf "\\$Id: foo\\$\\\\r\\\\n" >small &&\n'
            span_id: 177
          ) (Token id:Id.Lit_Chars val:'\tcat small small >large &&\n' span_id:178) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config core.bigfilethreshold 20 &&\n'
            span_id: 179
          ) (Token id:Id.Lit_Chars val:'\tgit config filter.test.clean "sed s/.*/CLEAN/"\n' span_id:180)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'autocrlf=true converts on input' span_id:187))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:191) 
          (Token id:Id.Lit_Chars val:'\ttest_config core.autocrlf true &&\n' span_id:192) (Token id:Id.Lit_Chars val:'\tcheck_input\n' span_id:193)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'eol=crlf converts on input' span_id:200))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:204) 
          (Token id:Id.Lit_Chars val:'\tset_attr eol=crlf &&\n' span_id:205) (Token id:Id.Lit_Chars val:'\tcheck_input\n' span_id:206)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'ident converts on input' span_id:213))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:217) 
          (Token id:Id.Lit_Chars val:'\tset_attr ident &&\n' span_id:218) (Token id:Id.Lit_Chars val:'\tcheck_input\n' span_id:219)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'user-defined filters convert on input' span_id:226))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:230) 
          (Token id:Id.Lit_Chars val:'\tset_attr filter=test &&\n' span_id:231) (Token id:Id.Lit_Chars val:'\tcheck_input\n' span_id:232)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'setup output tests' span_id:239))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:243) 
          (Token id:Id.Lit_Chars val:'\techo "\\$Id\\$" >small &&\n' span_id:244) (Token id:Id.Lit_Chars val:'\tcat small small >large &&\n' span_id:245) 
          (Token id:Id.Lit_Chars val:'\tgit add small large &&\n' span_id:246) (Token id:Id.Lit_Chars val:'\tgit config core.bigfilethreshold 7 &&\n' span_id:247) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit config filter.test.smudge "sed s/.*/SMUDGE/"\n'
            span_id: 248
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'autocrlf=true converts on output' span_id:255))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:259) 
          (Token id:Id.Lit_Chars val:'\ttest_config core.autocrlf true &&\n' span_id:260) (Token id:Id.Lit_Chars val:'\tcheck_output\n' span_id:261)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'eol=crlf converts on output' span_id:268))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:272) 
          (Token id:Id.Lit_Chars val:'\tset_attr eol=crlf &&\n' span_id:273) (Token id:Id.Lit_Chars val:'\tcheck_output\n' span_id:274)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'user-defined filters convert on output' span_id:281))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:285) 
          (Token id:Id.Lit_Chars val:'\tset_attr filter=test &&\n' span_id:286) (Token id:Id.Lit_Chars val:'\tcheck_output\n' span_id:287)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'ident converts on output' span_id:294))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:298) 
          (Token id:Id.Lit_Chars val:'\tset_attr ident &&\n' span_id:299) (Token id:Id.Lit_Chars val:'\trm -f small large &&\n' span_id:300) 
          (Token id:Id.Lit_Chars val:'\tgit checkout small large &&\n' span_id:301) (Token id:Id.Lit_Chars val:'\tsed -n "s/Id: .*/Id: SHA/p" <small >small.clean &&\n' span_id:302) 
          (Token id:Id.Lit_Chars val:'\thead -n 1 large >large.head &&\n' span_id:303) (Token id:Id.Lit_Chars val:'\tsed -n "s/Id: .*/Id: SHA/p" <large.head >large.clean &&\n' span_id:304) 
          (Token id:Id.Lit_Chars val:'\ttest_cmp small.clean large.clean\n' span_id:305)
        )
      }
    )
    (C {(test_done)})
  ]
)