(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: {(SQ <"git blame textconv support">)}
          spids: [4]
        )
      ]
      spids: [4]
    )
    (C {(.)} {(./test-lib.sh)})
    (FuncDef
      name: find_blame
      body: (BraceGroup children:[(C {(sed)} {(-e)} {(SQ <"s/^[^(]*//">)})] spids:[18])
      spids: [14 17]
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(helper)} spids:[34])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {("#!/bin/sh\n") 
              (
"grep -q '^bin: ' \"$1\" || { echo \"E: $1 is not \\\"binary\\\" file\" 1>&2; exit 1; }\n"
              ) ("\"$PERL_PATH\" -p -e 's/^bin: /converted: /' \"$1\"\n")
            }
          do_expansion: False
          here_end: EOF
          was_filled: True
          spids: [37]
        )
      ]
    )
    (C {(chmod)} {(Lit_Other "+") (x)} {(helper)})
    (C {(test_expect_success)} {(SQ <"setup ">)} 
      {
        (SQ <"\n"> <"\techo \"bin: test number 0\" >zero.bin &&\n"> 
          <"\techo \"bin: test 1\" >one.bin &&\n"> <"\techo \"bin: test number 2\" >two.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 1 version 2\" >one.bin &&\n"> <"\techo \"bin: test number 2 version 2\" >>two.bin &&\n"> <"\trm -f symlink.bin &&\n"> 
          <"\ttest_ln_s_add two.bin symlink.bin &&\n"> <"\tGIT_AUTHOR_NAME=Number2 git commit -a -m Second --date=\"2010-01-01 20:00:00\"\n">
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expected)} spids:[74])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: {(DQ ("(Number2 2010-01-01 20:00:00 +0000 1) bin: test 1 version 2\n"))}
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [77]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <"no filter specified">)} 
      {
        (SQ <"\n"> <"\tgit blame one.bin >blame &&\n"> <"\tfind_blame Number2 <blame >result &&\n"> 
          <"\ttest_cmp expected result\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"setup textconv filters">)} 
      {
        (SQ <"\n"> <"\techo \"*.bin diff=test\" >.gitattributes &&\n"> 
          <"\techo \"zero.bin eol=crlf\" >>.gitattributes &&\n"> <"\tgit config diff.test.textconv ./helper &&\n"> <"\tgit config diff.test.cachetextconv false\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"blame with --no-textconv">)} 
      {
        (SQ <"\n"> <"\tgit blame --no-textconv one.bin >blame &&\n"> 
          <"\tfind_blame <blame> result &&\n"> <"\ttest_cmp expected result\n">
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expected)} spids:[127])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: {(DQ ("(Number2 2010-01-01 20:00:00 +0000 1) converted: test 1 version 2\n"))}
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [130]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <"basic blame on last commit">)} 
      {
        (SQ <"\n"> <"\tgit blame one.bin >blame &&\n"> <"\tfind_blame  <blame >result &&\n"> 
          <"\ttest_cmp expected result\n">
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expected)} spids:[151])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {
              (DQ ("(Number1 2010-01-01 18:00:00 +0000 1) converted: test number 2\n") 
                ("(Number2 2010-01-01 20:00:00 +0000 2) converted: test number 2 version 2\n")
              )
            }
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [154]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <"blame --textconv going through revisions">)} 
      {
        (SQ <"\n"> <"\tgit blame --textconv two.bin >blame &&\n"> <"\tfind_blame <blame >result &&\n"> 
          <"\ttest_cmp expected result\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"blame --textconv with local changes">)} 
      {
        (SQ <"\n"> <"\ttest_when_finished \"git checkout zero.bin\" &&\n"> 
          <"\tprintf \"bin: updated number 0\\015\" >zero.bin &&\n"> <"\tgit blame --textconv zero.bin >blame &&\n"> 
          <"\texpect=\"(Not Committed Yet ....-..-.. ..:..:.. +0000 1)\" &&\n"> <"\texpect=\"$expect converted: updated number 0\" &&\n"> 
          <"\texpr \"$(find_blame <blame)\" : \"^$expect\"\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"setup +cachetextconv">)} 
      {(SQ <"\n"> <"\tgit config diff.test.cachetextconv true\n">)}
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expected_one)} spids:[205])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: {(DQ ("(Number2 2010-01-01 20:00:00 +0000 1) converted: test 1 version 2\n"))}
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [208]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <"blame --textconv works with textconvcache">)} 
      {
        (SQ <"\n"> <"\tgit blame --textconv two.bin >blame &&\n"> <"\tfind_blame <blame >result &&\n"> 
          <"\ttest_cmp expected result &&\n"> <"\tgit blame --textconv one.bin >blame &&\n"> <"\tfind_blame  <blame >result &&\n"> 
          <"\ttest_cmp expected_one result\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"setup -cachetextconv">)} 
      {(SQ <"\n"> <"\tgit config diff.test.cachetextconv false\n">)}
    )
    (C {(test_expect_success)} {(SQ <"make a new commit">)} 
      {
        (SQ <"\n"> <"\techo \"bin: test number 2 version 3\" >>two.bin &&\n"> 
          <"\tGIT_AUTHOR_NAME=Number3 git commit -a -m Third --date=\"2010-01-01 22:00:00\"\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"blame from previous revision">)} 
      {
        (SQ <"\n"> <"\tgit blame HEAD^ two.bin >blame &&\n"> <"\tfind_blame <blame >result &&\n"> 
          <"\ttest_cmp expected result\n">
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expected)} spids:[271])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: {(DQ ("(Number2 2010-01-01 20:00:00 +0000 1) two.bin\n"))}
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [274]
        )
      ]
    )
    (C {(test_expect_success)} {(SYMLINKS)} {(SQ <"blame with --no-textconv (on symlink)">)} 
      {
        (SQ <"\n"> <"\tgit blame --no-textconv symlink.bin >blame &&\n"> 
          <"\tfind_blame <blame >result &&\n"> <"\ttest_cmp expected result\n">
        )
      }
    )
    (C {(test_expect_success)} {(SYMLINKS)} {(SQ <"blame --textconv (on symlink)">)} 
      {
        (SQ <"\n"> <"\tgit blame --textconv symlink.bin >blame &&\n"> 
          <"\tfind_blame <blame >result &&\n"> <"\ttest_cmp expected result\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"make another new commit">)} 
      {
        (SQ <"\n"> <"\tcat >three.bin <<\\EOF &&\n"> <"bin: test number 2\n"> 
          <"bin: test number 2 version 2\n"> <"bin: test number 2 version 3\n"> <"bin: test number 3\n"> <"EOF\n"> <"\tgit add three.bin &&\n"> 
          <"\tGIT_AUTHOR_NAME=Number4 git commit -a -m Fourth --date=\"2010-01-01 23:00:00\"\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"blame on last commit (-C -C, symlink)">)} 
      {
        (SQ <"\n"> <"\tgit blame -C -C three.bin >blame &&\n"> <"\tfind_blame <blame >result &&\n"> 
          <"\tcat >expected <<\\EOF &&\n"> <"(Number1 2010-01-01 18:00:00 +0000 1) converted: test number 2\n"> 
          <"(Number2 2010-01-01 20:00:00 +0000 2) converted: test number 2 version 2\n"> <"(Number3 2010-01-01 22:00:00 +0000 3) converted: test number 2 version 3\n"> 
          <"(Number4 2010-01-01 23:00:00 +0000 4) converted: test number 3\n"> <"EOF\n"> <"\ttest_cmp expected result\n">
        )
      }
    )
    (C {(test_done)})
  ]
)