(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description spids:[12])
          op: Equal
          rhs: {(SQ <'git blame textconv support'>)}
          spids: [12]
        )
      ]
      spids: [12]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.FuncDef
      name: find_blame
      body: (command.BraceGroup children:[(C {(sed)} {(-e)} {(SQ <'s/^[^(]*//'>)})] spids:[26])
      spids: [22 25]
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(helper)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(SQ <EOF>)}
          here_end_span_id: 53
          stdin_parts: [
            ('#!/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')
          ]
        )
      ]
    )
    (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'>
        )
      }
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(EOF)}
          here_end_span_id: 94
          stdin_parts: [('(Number2 2010-01-01 20:00:00 +0000 1) bin: test 1 version 2\n')]
        )
      ]
    )
    (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'>
        )
      }
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(EOF)}
          here_end_span_id: 149
          stdin_parts: [('(Number2 2010-01-01 20:00:00 +0000 1) converted: test 1 version 2\n')]
        )
      ]
    )
    (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'>
        )
      }
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(EOF)}
          here_end_span_id: 176
          stdin_parts: [
            ('(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')
          ]
        )
      ]
    )
    (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'>)}
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected_one)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(EOF)}
          here_end_span_id: 231
          stdin_parts: [('(Number2 2010-01-01 20:00:00 +0000 1) converted: test 1 version 2\n')]
        )
      ]
    )
    (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'>
        )
      }
    )
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected)})
        (redir.HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(EOF)}
          here_end_span_id: 299
          stdin_parts: [('(Number2 2010-01-01 20:00:00 +0000 1) two.bin\n')]
        )
      ]
    )
    (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)})
  ]
)