(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:'git svn log tests' span_id:15))}
          spids: [13]
        )
      ]
    )
    (C {(.)} {(./lib-git-svn.sh)})
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'setup repository and import' span_id:26))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:30) 
          (Token id:Id.Lit_Chars val:'\tmkdir import &&\n' span_id:31) (Token id:Id.Lit_Chars val:'\t(\n' span_id:32) 
          (Token id:Id.Lit_Chars val:'\t\tcd import &&\n' span_id:33) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tfor i in trunk branches/a branches/b tags/0.1 tags/0.2 tags/0.3\n'
            span_id: 34
          ) (Token id:Id.Lit_Chars val:'\t\tdo\n' span_id:35) 
          (Token id:Id.Lit_Chars val:'\t\t\tmkdir -p $i &&\n' span_id:36) (Token id:Id.Lit_Chars val:'\t\t\techo hello >>$i/README ||\n' span_id:37) 
          (Token id:Id.Lit_Chars val:'\t\t\texit 1\n' span_id:38) (Token id:Id.Lit_Chars val:'\t\tdone &&\n' span_id:39) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tsvn_cmd import -m test . "$svnrepo"\n'
            span_id: 40
          ) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:41) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit svn init "$svnrepo" -T trunk -b branches -t tags &&\n'
            span_id: 42
          ) (Token id:Id.Lit_Chars val:'\tgit svn fetch &&\n' span_id:43) 
          (Token id:Id.Lit_Chars val:'\tgit reset --hard origin/trunk &&\n' span_id:44) (Token id:Id.Lit_Chars val:'\techo bye >> README &&\n' span_id:45) 
          (Token id:Id.Lit_Chars val:'\tgit commit -a -m bye &&\n' span_id:46) (Token id:Id.Lit_Chars val:'\tgit svn dcommit &&\n' span_id:47) 
          (Token id:Id.Lit_Chars val:'\tgit reset --hard origin/a &&\n' span_id:48) (Token id:Id.Lit_Chars val:'\techo why >> FEEDME &&\n' span_id:49) 
          (Token id:Id.Lit_Chars val:'\tgit update-index --add FEEDME &&\n' span_id:50) (Token id:Id.Lit_Chars val:'\tgit commit -m feedme &&\n' span_id:51) 
          (Token id:Id.Lit_Chars val:'\tgit svn dcommit &&\n' span_id:52) (Token id:Id.Lit_Chars val:'\tgit reset --hard origin/trunk &&\n' span_id:53) 
          (Token id:Id.Lit_Chars val:'\techo aye >> README &&\n' span_id:54) (Token id:Id.Lit_Chars val:'\tgit commit -a -m aye &&\n' span_id:55) 
          (Token id:Id.Lit_Chars val:'\tgit svn dcommit &&\n' span_id:56) (Token id:Id.Lit_Chars val:'\tgit reset --hard origin/b &&\n' span_id:57) 
          (Token id:Id.Lit_Chars val:'\techo spy >> README &&\n' span_id:58) (Token id:Id.Lit_Chars val:'\tgit commit -a -m spy &&\n' span_id:59) 
          (Token id:Id.Lit_Chars val:'\techo try >> README &&\n' span_id:60) (Token id:Id.Lit_Chars val:'\tgit commit -a -m try &&\n' span_id:61) 
          (Token id:Id.Lit_Chars val:'\tgit svn dcommit\n' span_id:62) (Token id:Id.Lit_Chars val:'\t' span_id:63)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'run log' span_id:70))} 
      {
        (DQ ('\n') ('\tgit reset --hard origin/a &&\n') 
          ('\tgit svn log -r2 origin/trunk | grep ^r2 &&\n') ('\tgit svn log -r4 origin/trunk | grep ^r4 &&\n') ('\tgit svn log -r3 | grep ^r3\n') ('\t')
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'run log against a from trunk' span_id:86))} 
      {
        (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') ('\tgit svn log -r3 origin/a | grep ^r3\n') 
          ('\t')
        )
      }
    )
    (command.Simple
      words: [{(printf)} {(SQ (Token id:Id.Lit_Chars val:'r1 \\nr2 \\nr4 \\n' span_id:100))}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:103)
          fd: -1
          arg_word: {(expected-range-r1-r2-r4)}
        )
      ]
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'test ascending revision range' span_id:111))} 
      {
        (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') 
          (
"\tgit svn log -r 1:4 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r1-r2-r4 -\n"
          ) ('\t')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test ascending revision range with --show-commit'
            span_id: 125
          )
        )
      } 
      {
        (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') 
          (
"\tgit svn log --show-commit -r 1:4 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r1-r2-r4 -\n"
          ) ('\t')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test ascending revision range with --show-commit (sha1)'
            span_id: 139
          )
        )
      } 
      {
        (DQ ('\n') ('\tgit svn find-rev r1 >expected-range-r1-r2-r4-sha1 &&\n') 
          ('\tgit svn find-rev r2 >>expected-range-r1-r2-r4-sha1 &&\n') ('\tgit svn find-rev r4 >>expected-range-r1-r2-r4-sha1 &&\n') ('\tgit reset --hard origin/trunk &&\n') 
          ("\tgit svn log --show-commit -r 1:4 | grep '^r[0-9]' | cut -d'|' -f2 >out &&\n") ('\tgit rev-parse ') 
          (word_part.EscapedLiteral
            token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:150)
          ) ('(cat out) >actual &&\n') ('\ttest_cmp expected-range-r1-r2-r4-sha1 actual\n') ('\t')
        )
      }
    )
    (command.Simple
      words: [{(printf)} {(SQ (Token id:Id.Lit_Chars val:'r4 \\nr2 \\nr1 \\n' span_id:160))}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:163)
          fd: -1
          arg_word: {(expected-range-r4-r2-r1)}
        )
      ]
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'test descending revision range' span_id:171))} 
      {
        (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') 
          (
"\tgit svn log -r 4:1 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r4-r2-r1 -\n"
          ) ('\t')
        )
      }
    )
    (command.Simple
      words: [{(printf)} {(SQ (Token id:Id.Lit_Chars val:'r1 \\nr2 \\n' span_id:185))}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:188)
          fd: -1
          arg_word: {(expected-range-r1-r2)}
        )
      ]
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test ascending revision range with unreachable revision'
            span_id: 196
          )
        )
      } 
      {
        (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') 
          (
"\tgit svn log -r 1:3 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r1-r2 -\n"
          ) ('\t')
        )
      }
    )
    (command.Simple
      words: [{(printf)} {(SQ (Token id:Id.Lit_Chars val:'r2 \\nr1 \\n' span_id:210))}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:213)
          fd: -1
          arg_word: {(expected-range-r2-r1)}
        )
      ]
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test descending revision range with unreachable revision'
            span_id: 221
          )
        )
      } 
      {
        (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') 
          (
"\tgit svn log -r 3:1 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r2-r1 -\n"
          ) ('\t')
        )
      }
    )
    (command.Simple
      words: [{(printf)} {(SQ (Token id:Id.Lit_Chars val:'r2 \\n' span_id:235))}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:238)
          fd: -1
          arg_word: {(expected-range-r2)}
        )
      ]
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 
'test ascending revision range with unreachable upper boundary revision and 1 commit'
            span_id: 246
          )
        )
      } 
      {
        (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') 
          ("\tgit svn log -r 2:3 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r2 -\n") ('\t')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 
'test descending revision range with unreachable upper boundary revision and 1 commit'
            span_id: 260
          )
        )
      } 
      {
        (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') 
          ("\tgit svn log -r 3:2 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r2 -\n") ('\t')
        )
      }
    )
    (command.Simple
      words: [{(printf)} {(SQ (Token id:Id.Lit_Chars val:'r4 \\n' span_id:274))}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:277)
          fd: -1
          arg_word: {(expected-range-r4)}
        )
      ]
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 
'test ascending revision range with unreachable lower boundary revision and 1 commit'
            span_id: 285
          )
        )
      } 
      {
        (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') 
          ("\tgit svn log -r 3:4 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r4 -\n") ('\t')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 
'test descending revision range with unreachable lower boundary revision and 1 commit'
            span_id: 299
          )
        )
      } 
      {
        (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') 
          ("\tgit svn log -r 4:3 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r4 -\n") ('\t')
        )
      }
    )
    (command.Simple
      words: [
        {(printf)}
        {(--)}
        {
          (SQ 
            (Token
              id: Id.Lit_Chars
              val: '------------------------------------------------------------------------\\n'
              span_id: 315
            )
          )
        }
      ]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:318)
          fd: -1
          arg_word: {(expected-separator)}
        )
      ]
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test ascending revision range with unreachable boundary revisions and no commits'
            span_id: 326
          )
        )
      } 
      {
        (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') 
          ('\tgit svn log -r 5:6 | test_cmp expected-separator -\n') ('\t')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test descending revision range with unreachable boundary revisions and no commits'
            span_id: 340
          )
        )
      } 
      {
        (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') 
          ('\tgit svn log -r 6:5 | test_cmp expected-separator -\n') ('\t')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test ascending revision range with unreachable boundary revisions and 1 commit'
            span_id: 354
          )
        )
      } 
      {
        (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') 
          ("\tgit svn log -r 3:5 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r4 -\n") ('\t')
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'test descending revision range with unreachable boundary revisions and 1 commit'
            span_id: 368
          )
        )
      } 
      {
        (DQ ('\n') ('\tgit reset --hard origin/trunk &&\n') 
          ("\tgit svn log -r 5:3 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r4 -\n") ('\t')
        )
      }
    )
    (C {(test_done)})
  ]
)