(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: {(SQ <"git branch display tests">)}
          spids: [4]
        )
      ]
      spids: [4]
    )
    (C {(.)} {(./test-lib.sh)})
    (C {(test_expect_success)} {(SQ <"make commits">)} 
      {
        (SQ <"\n"> <"\techo content >file &&\n"> <"\tgit add file &&\n"> <"\tgit commit -m one &&\n"> 
          <"\techo content >>file &&\n"> <"\tgit commit -a -m two\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"make branches">)} 
      {(SQ <"\n"> <"\tgit branch branch-one &&\n"> <"\tgit branch branch-two HEAD^\n">)}
    )
    (C {(test_expect_success)} {(SQ <"make remote branches">)} 
      {
        (SQ <"\n"> <"\tgit update-ref refs/remotes/origin/branch-one branch-one &&\n"> 
          <"\tgit update-ref refs/remotes/origin/branch-two branch-two &&\n"> <"\tgit symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/branch-one\n">
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[59])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: {("  branch-one\n") ("  branch-two\n") ("* master\n")}
          do_expansion: False
          here_end: EOF
          was_filled: True
          spids: [62]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <"git branch shows local branches">)} 
      {(SQ <"\n"> <"\tgit branch >actual &&\n"> <"\ttest_cmp expect actual\n">)}
    )
    (C {(test_expect_success)} {(SQ <"git branch --list shows local branches">)} 
      {(SQ <"\n"> <"\tgit branch --list >actual &&\n"> <"\ttest_cmp expect actual\n">)}
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[95])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: {("  branch-one\n") ("  branch-two\n")}
          do_expansion: False
          here_end: EOF
          was_filled: True
          spids: [98]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <"git branch --list pattern shows matching local branches">)} 
      {(SQ <"\n"> <"\tgit branch --list branch* >actual &&\n"> <"\ttest_cmp expect actual\n">)}
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[118])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {("  origin/HEAD -> origin/branch-one\n") ("  origin/branch-one\n") 
              ("  origin/branch-two\n")
            }
          do_expansion: False
          here_end: EOF
          was_filled: True
          spids: [121]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <"git branch -r shows remote branches">)} 
      {(SQ <"\n"> <"\tgit branch -r >actual &&\n"> <"\ttest_cmp expect actual\n">)}
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[141])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {("  branch-one\n") ("  branch-two\n") ("* master\n") 
              ("  remotes/origin/HEAD -> origin/branch-one\n") ("  remotes/origin/branch-one\n") ("  remotes/origin/branch-two\n")
            }
          do_expansion: False
          here_end: EOF
          was_filled: True
          spids: [144]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <"git branch -a shows local and remote branches">)} 
      {(SQ <"\n"> <"\tgit branch -a >actual &&\n"> <"\ttest_cmp expect actual\n">)}
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[164])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: {("two\n") ("one\n") ("two\n")}
          do_expansion: False
          here_end: EOF
          was_filled: True
          spids: [167]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <"git branch -v shows branch summaries">)} 
      {
        (SQ <"\n"> <"\tgit branch -v >tmp &&\n"> <"\tawk \"{print \\$NF}\" <tmp >actual &&\n"> 
          <"\ttest_cmp expect actual\n">
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[188])
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: {("two\n") ("one\n")}
          do_expansion: False
          here_end: EOF
          was_filled: True
          spids: [191]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <"git branch --list -v pattern shows branch summaries">)} 
      {
        (SQ <"\n"> <"\tgit branch --list -v branch* >tmp &&\n"> 
          <"\tawk \"{print \\$NF}\" <tmp >actual &&\n"> <"\ttest_cmp expect actual\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"git branch -v pattern does not show branch summaries">)} 
      {(SQ <"\n"> <"\ttest_must_fail git branch -v branch*\n">)}
    )
    (C {(test_expect_success)} {(SQ <"git branch shows detached HEAD properly">)} 
      {
        (SQ <"\n"> <"\tcat >expect <<EOF &&\n"> 
          <"* (HEAD detached at $(git rev-parse --short HEAD^0))\n"> <"  branch-one\n"> <"  branch-two\n"> <"  master\n"> <"EOF\n"> <"\tgit checkout HEAD^0 &&\n"> 
          <"\tgit branch >actual &&\n"> <"\ttest_i18ncmp expect actual\n">
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ <"git branch shows detached HEAD properly after checkout --detach">)} 
      {
        (SQ <"\n"> <"\tgit checkout master &&\n"> <"\tcat >expect <<EOF &&\n"> 
          <"* (HEAD detached at $(git rev-parse --short HEAD^0))\n"> <"  branch-one\n"> <"  branch-two\n"> <"  master\n"> <"EOF\n"> <"\tgit checkout --detach &&\n"> 
          <"\tgit branch >actual &&\n"> <"\ttest_i18ncmp expect actual\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"git branch shows detached HEAD properly after moving">)} 
      {
        (SQ <"\n"> <"\tcat >expect <<EOF &&\n"> 
          <"* (HEAD detached from $(git rev-parse --short HEAD))\n"> <"  branch-one\n"> <"  branch-two\n"> <"  master\n"> <"EOF\n"> <"\tgit reset --hard HEAD^1 &&\n"> 
          <"\tgit branch >actual &&\n"> <"\ttest_i18ncmp expect actual\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"git branch shows detached HEAD properly from tag">)} 
      {
        (SQ <"\n"> <"\tcat >expect <<EOF &&\n"> <"* (HEAD detached at fromtag)\n"> <"  branch-one\n"> 
          <"  branch-two\n"> <"  master\n"> <"EOF\n"> <"\tgit tag fromtag master &&\n"> <"\tgit checkout fromtag &&\n"> 
          <"\tgit branch >actual &&\n"> <"\ttest_i18ncmp expect actual\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"git branch shows detached HEAD properly after moving from tag">)} 
      {
        (SQ <"\n"> <"\tcat >expect <<EOF &&\n"> <"* (HEAD detached from fromtag)\n"> <"  branch-one\n"> 
          <"  branch-two\n"> <"  master\n"> <"EOF\n"> <"\tgit reset --hard HEAD^1 &&\n"> <"\tgit branch >actual &&\n"> 
          <"\ttest_i18ncmp expect actual\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"git branch `--sort` option">)} 
      {
        (SQ <"\n"> <"\tcat >expect <<-\\EOF &&\n"> <"\t* (HEAD detached from fromtag)\n"> 
          <"\t  branch-two\n"> <"\t  branch-one\n"> <"\t  master\n"> <"\tEOF\n"> <"\tgit branch --sort=objectsize >actual &&\n"> 
          <"\ttest_i18ncmp expect actual\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"git branch --points-at option">)} 
      {
        (SQ <"\n"> <"\tcat >expect <<-\\EOF &&\n"> <"\t  branch-one\n"> <"\t  master\n"> <"\tEOF\n"> 
          <"\tgit branch --points-at=branch-one >actual &&\n"> <"\ttest_cmp expect actual\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"ambiguous branch/tag not marked">)} 
      {
        (SQ <"\n"> <"\tgit tag ambiguous &&\n"> <"\tgit branch ambiguous &&\n"> 
          <"\techo \"  ambiguous\" >expect &&\n"> <"\tgit branch --list ambiguous >actual &&\n"> <"\ttest_cmp expect actual\n">
        )
      }
    )
    (C {(test_expect_success)} {(SQ <"local-branch symrefs shortened properly">)} 
      {
        (SQ <"\n"> <"\tgit symbolic-ref refs/heads/ref-to-branch refs/heads/branch-one &&\n"> 
          <"\tgit symbolic-ref refs/heads/ref-to-remote refs/remotes/origin/branch-one &&\n"> <"\tcat >expect <<-\\EOF &&\n"> <"\t  ref-to-branch -> branch-one\n"> 
          <"\t  ref-to-remote -> refs/remotes/origin/branch-one\n"> <"\tEOF\n"> <"\tgit branch >actual.raw &&\n"> <"\tgrep ref-to <actual.raw >actual &&\n"> 
          <"\ttest_cmp expect actual\n">
        )
      }
    )
    (C {(test_done)})
  ]
)