(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: {(SQ <"git svn authors prog tests">)}
          spids: [13]
        )
      ]
      spids: [13]
    )
    (C {(.)} {(./lib-git-svn.sh)})
    (SimpleCommand
      words: [{(write_script)} {(svn-authors-prog)} {(DQ ($ VSub_Name "$PERL_PATH"))}]
      redirects: [
        (HereDoc
          op_id: Redir_DLessDash
          fd: -1
          body: 
            {("$_ = shift;\n") ("if (s/-sub$//)  {\n") ("print \"$_ <$_\\@sub.example.com>\\n\";\n") 
              ("} else {\n") ("print \"$_ <$_\\@example.com>\\n\";\n") ("}\n")
            }
          do_expansion: False
          here_end: EOF
          was_filled: True
          spids: [32]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <"svn-authors setup">)} 
      {
        (SQ <"\n"> <"\tcat >svn-authors <<-\\EOF\n"> 
          <"\tff = FFFFFFF FFFFFFF <fFf@other.example.com>\n"> <"\tEOF\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"setup svnrepo">)} 
      {
        (SQ <"\n"> <"\tfor i in aa bb cc-sub dd-sub ee-foo ff\n"> <"\tdo\n"> 
          <"\t\tsvn mkdir -m $i --username $i \"$svnrepo\"/$i\n"> <"\tdone\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"import authors with prog and file">)} 
      {
        (SQ <"\n"> <"\tgit svn clone --authors-prog=./svn-authors-prog \\\n"> 
          <"\t    --authors-file=svn-authors \"$svnrepo\" x\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"imported 6 revisions successfully">)} 
      {
        (SQ <"\n"> <"\t(\n"> <"\t\tcd x\n"> 
          <"\t\ttest \"$(git rev-list refs/remotes/git-svn | wc -l)\" -eq 6\n"> <"\t)\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"authors-prog ran correctly">)} 
      {
        (SQ <"\n"> <"\t(\n"> <"\t\tcd x\n"> 
          <"\t\tgit rev-list -1 --pretty=raw refs/remotes/git-svn~1 | \\\n"> <"\t\t  grep \"^author ee-foo <ee-foo@example\\.com> \" &&\n"> 
          <"\t\tgit rev-list -1 --pretty=raw refs/remotes/git-svn~2 | \\\n"> <"\t\t  grep \"^author dd <dd@sub\\.example\\.com> \" &&\n"> 
          <"\t\tgit rev-list -1 --pretty=raw refs/remotes/git-svn~3 | \\\n"> <"\t\t  grep \"^author cc <cc@sub\\.example\\.com> \" &&\n"> 
          <"\t\tgit rev-list -1 --pretty=raw refs/remotes/git-svn~4 | \\\n"> <"\t\t  grep \"^author bb <bb@example\\.com> \" &&\n"> 
          <"\t\tgit rev-list -1 --pretty=raw refs/remotes/git-svn~5 | \\\n"> <"\t\t  grep \"^author aa <aa@example\\.com> \"\n"> <"\t)\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"authors-file overrode authors-prog">)} 
      {
        (SQ <"\n"> <"\t(\n"> <"\t\tcd x\n"> 
          <"\t\tgit rev-list -1 --pretty=raw refs/remotes/git-svn | \\\n"> <"\t\t  grep \"^author FFFFFFF FFFFFFF <fFf@other\\.example\\.com> \"\n"> <"\t)\n">
        )
      }
    )
    (C {(git)} {(--git-dir) (Lit_Other "=") (x/.git)} {(config)} {(--unset)} {(svn.authorsfile)})
    (C {(git)} {(--git-dir) (Lit_Other "=") (x/.git)} {(config)} {(--unset)} {(svn.authorsprog)})
    (C {(test_expect_success)} {(SQ <"authors-prog handled special characters in username">)} 
      {
        (SQ <"\n"> <"\tsvn mkdir -m bad --username \"xyz; touch evil\" \"$svnrepo\"/bad &&\n"> 
          <"\t(\n"> <"\t\tcd x &&\n"> <"\t\tgit svn --authors-prog=../svn-authors-prog fetch &&\n"> 
          <"\t\tgit rev-list -1 --pretty=raw refs/remotes/git-svn |\n"> <"\t\tgrep \"^author xyz; touch evil <xyz; touch evil@example\\.com> \" &&\n"> 
          <"\t\t! test -f evil\n"> <"\t)\n">
        )
      }
    )
    (C {(test_done)})
  ]
)