(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:'fetch --all works correctly' span_id:6))}
          spids: [4]
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.ShFunction
      name: setup_repository
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(mkdir)} {(DQ ($ Id.VSub_Number '$1'))})
                (command.Subshell
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.AndOr
                          ops: [
                            Id.Op_DAmp
                            Id.Op_DAmp
                            Id.Op_DAmp
                            Id.Op_DAmp
                            Id.Op_DAmp
                            Id.Op_DAmp
                            Id.Op_DAmp
                            Id.Op_DAmp
                            Id.Op_DAmp
                            Id.Op_DAmp
                            Id.Op_DAmp
                          ]
                          children: [
                            (C {(cd)} {(DQ ($ Id.VSub_Number '$1'))})
                            (C {(git)} {(init)})
                            (command.Simple
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_Great val:'>' span_id:50)
                                  fd: -1
                                  arg_word: {(file)}
                                )
                              ]
                            )
                            (C {(git)} {(add)} {(file)})
                            (C {(test_tick)})
                            (C {(git)} {(commit)} {(-m)} {(DQ (Initial))})
                            (C {(git)} {(checkout)} {(-b)} {(side)})
                            (command.Simple
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_Great val:'>' span_id:94)
                                  fd: -1
                                  arg_word: {(Id.KW_Elif elif)}
                                )
                              ]
                            )
                            (C {(git)} {(add)} {(Id.KW_Elif elif)})
                            (C {(test_tick)})
                            (C {(git)} {(commit)} {(-m)} {(DQ (Second))})
                            (C {(git)} {(checkout)} {(master)})
                          ]
                        )
                      ]
                    )
                )
              ]
            )
          ]
        )
    )
    (C {(test_expect_success)} {(setup)} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:144) 
          (Token id:Id.Lit_Chars val:'\tsetup_repository one &&\n' span_id:145) (Token id:Id.Lit_Chars val:'\tsetup_repository two &&\n' span_id:146) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:147) (Token id:Id.Lit_Chars val:'\t\tcd two && git branch another\n' span_id:148) 
          (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:149) (Token id:Id.Lit_Chars val:'\tgit clone --mirror two three &&\n' span_id:150) 
          (Token id:Id.Lit_Chars val:'\tgit clone one test\n' span_id:151)
        )
      }
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:157)
          fd: -1
          arg_word: {(test/expect)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:161)
          fd: -1
          here_begin: {(EOF)}
          here_end_span_id: 177
          stdin_parts: [
            ('  one/master\n')
            ('  one/side\n')
            ('  origin/HEAD -> origin/master\n')
            ('  origin/master\n')
            ('  origin/side\n')
            ('  three/another\n')
            ('  three/master\n')
            ('  three/side\n')
            ('  two/another\n')
            ('  two/master\n')
            ('  two/side\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git fetch --all' span_id:182))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:186) 
          (Token id:Id.Lit_Chars val:'\t(cd test &&\n' span_id:187) (Token id:Id.Lit_Chars val:'\t git remote add one ../one &&\n' span_id:188) 
          (Token id:Id.Lit_Chars val:'\t git remote add two ../two &&\n' span_id:189) (Token id:Id.Lit_Chars val:'\t git remote add three ../three &&\n' span_id:190) 
          (Token id:Id.Lit_Chars val:'\t git fetch --all &&\n' span_id:191) (Token id:Id.Lit_Chars val:'\t git branch -r > output &&\n' span_id:192) 
          (Token id:Id.Lit_Chars val:'\t test_cmp expect output)\n' span_id:193)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'git fetch --all should continue if a remote has errors'
            span_id: 200
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:204) 
          (Token id:Id.Lit_Chars val:'\t(git clone one test2 &&\n' span_id:205) (Token id:Id.Lit_Chars val:'\t cd test2 &&\n' span_id:206) 
          (Token
            id: Id.Lit_Chars
            val: '\t git remote add bad ../non-existing &&\n'
            span_id: 207
          ) (Token id:Id.Lit_Chars val:'\t git remote add one ../one &&\n' span_id:208) 
          (Token id:Id.Lit_Chars val:'\t git remote add two ../two &&\n' span_id:209) (Token id:Id.Lit_Chars val:'\t git remote add three ../three &&\n' span_id:210) 
          (Token id:Id.Lit_Chars val:'\t test_must_fail git fetch --all &&\n' span_id:211) (Token id:Id.Lit_Chars val:'\t git branch -r > output &&\n' span_id:212) 
          (Token id:Id.Lit_Chars val:'\t test_cmp ../test/expect output)\n' span_id:213)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'git fetch --all does not allow non-option arguments'
            span_id: 220
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:224) 
          (Token id:Id.Lit_Chars val:'\t(cd test &&\n' span_id:225) (Token id:Id.Lit_Chars val:'\t test_must_fail git fetch --all origin &&\n' span_id:226) 
          (Token
            id: Id.Lit_Chars
            val: '\t test_must_fail git fetch --all origin master)\n'
            span_id: 227
          )
        )
      }
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:233)
          fd: -1
          arg_word: {(expect)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:237)
          fd: -1
          here_begin: {(EOF)}
          here_end_span_id: 248
          stdin_parts: [
            ('  origin/HEAD -> origin/master\n')
            ('  origin/master\n')
            ('  origin/side\n')
            ('  three/another\n')
            ('  three/master\n')
            ('  three/side\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'git fetch --multiple (but only one remote)' span_id:253))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:257) 
          (Token id:Id.Lit_Chars val:'\t(git clone one test3 &&\n' span_id:258) (Token id:Id.Lit_Chars val:'\t cd test3 &&\n' span_id:259) 
          (Token id:Id.Lit_Chars val:'\t git remote add three ../three &&\n' span_id:260) (Token id:Id.Lit_Chars val:'\t git fetch --multiple three &&\n' span_id:261) 
          (Token id:Id.Lit_Chars val:'\t git branch -r > output &&\n' span_id:262) (Token id:Id.Lit_Chars val:'\t test_cmp ../expect output)\n' span_id:263)
        )
      }
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:269)
          fd: -1
          arg_word: {(expect)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:273)
          fd: -1
          here_begin: {(EOF)}
          here_end_span_id: 283
          stdin_parts: [
            ('  one/master\n')
            ('  one/side\n')
            ('  two/another\n')
            ('  two/master\n')
            ('  two/side\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'git fetch --multiple (two remotes)' span_id:288))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:292) 
          (Token id:Id.Lit_Chars val:'\t(git clone one test4 &&\n' span_id:293) (Token id:Id.Lit_Chars val:'\t cd test4 &&\n' span_id:294) 
          (Token id:Id.Lit_Chars val:'\t git remote rm origin &&\n' span_id:295) (Token id:Id.Lit_Chars val:'\t git remote add one ../one &&\n' span_id:296) 
          (Token id:Id.Lit_Chars val:'\t git remote add two ../two &&\n' span_id:297) (Token id:Id.Lit_Chars val:'\t git fetch --multiple one two &&\n' span_id:298) 
          (Token id:Id.Lit_Chars val:'\t git branch -r > output &&\n' span_id:299) (Token id:Id.Lit_Chars val:'\t test_cmp ../expect output)\n' span_id:300)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'git fetch --multiple (bad remote names)' span_id:307))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:311) 
          (Token id:Id.Lit_Chars val:'\t(cd test4 &&\n' span_id:312) (Token id:Id.Lit_Chars val:'\t test_must_fail git fetch --multiple four)\n' span_id:313)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'git fetch --all (skipFetchAll)' span_id:321))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:325) 
          (Token id:Id.Lit_Chars val:'\t(cd test4 &&\n' span_id:326) (Token id:Id.Lit_Chars val:'\t for b in $(git branch -r)\n' span_id:327) 
          (Token id:Id.Lit_Chars val:'\t do\n' span_id:328) (Token id:Id.Lit_Chars val:'\t\tgit branch -r -d $b || exit 1\n' span_id:329) 
          (Token id:Id.Lit_Chars val:'\t done &&\n' span_id:330) (Token id:Id.Lit_Chars val:'\t git remote add three ../three &&\n' span_id:331) 
          (Token
            id: Id.Lit_Chars
            val: '\t git config remote.three.skipFetchAll true &&\n'
            span_id: 332
          ) (Token id:Id.Lit_Chars val:'\t git fetch --all &&\n' span_id:333) 
          (Token id:Id.Lit_Chars val:'\t git branch -r > output &&\n' span_id:334) (Token id:Id.Lit_Chars val:'\t test_cmp ../expect output)\n' span_id:335)
        )
      }
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:341)
          fd: -1
          arg_word: {(expect)}
        )
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:345)
          fd: -1
          here_begin: {(EOF)}
          here_end_span_id: 358
          stdin_parts: [
            ('  one/master\n')
            ('  one/side\n')
            ('  three/another\n')
            ('  three/master\n')
            ('  three/side\n')
            ('  two/another\n')
            ('  two/master\n')
            ('  two/side\n')
          ]
        )
      ]
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'git fetch --multiple (ignoring skipFetchAll)' span_id:363))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:367) 
          (Token id:Id.Lit_Chars val:'\t(cd test4 &&\n' span_id:368) (Token id:Id.Lit_Chars val:'\t for b in $(git branch -r)\n' span_id:369) 
          (Token id:Id.Lit_Chars val:'\t do\n' span_id:370) (Token id:Id.Lit_Chars val:'\t\tgit branch -r -d $b || exit 1\n' span_id:371) 
          (Token id:Id.Lit_Chars val:'\t done &&\n' span_id:372) (Token id:Id.Lit_Chars val:'\t git fetch --multiple one two three &&\n' span_id:373) 
          (Token id:Id.Lit_Chars val:'\t git branch -r > output &&\n' span_id:374) (Token id:Id.Lit_Chars val:'\t test_cmp ../expect output)\n' span_id:375)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'git fetch --all --no-tags' span_id:382))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:386) 
          (Token id:Id.Lit_Chars val:'\t>expect &&\n' span_id:387) (Token id:Id.Lit_Chars val:'\tgit clone one test5 &&\n' span_id:388) 
          (Token id:Id.Lit_Chars val:'\tgit clone test5 test6 &&\n' span_id:389) (Token id:Id.Lit_Chars val:'\t(cd test5 && git tag test-tag) &&\n' span_id:390) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:391) (Token id:Id.Lit_Chars val:'\t\tcd test6 &&\n' span_id:392) 
          (Token id:Id.Lit_Chars val:'\t\tgit fetch --all --no-tags &&\n' span_id:393) (Token id:Id.Lit_Chars val:'\t\tgit tag >output\n' span_id:394) 
          (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:395) (Token id:Id.Lit_Chars val:'\ttest_cmp expect test6/output\n' span_id:396)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git fetch --all --tags' span_id:403))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:407) 
          (Token id:Id.Lit_Chars val:'\techo test-tag >expect &&\n' span_id:408) (Token id:Id.Lit_Chars val:'\tgit clone one test7 &&\n' span_id:409) 
          (Token id:Id.Lit_Chars val:'\tgit clone test7 test8 &&\n' span_id:410) (Token id:Id.Lit_Chars val:'\t(\n' span_id:411) 
          (Token id:Id.Lit_Chars val:'\t\tcd test7 &&\n' span_id:412) (Token id:Id.Lit_Chars val:'\t\ttest_commit test-tag &&\n' span_id:413) 
          (Token id:Id.Lit_Chars val:'\t\tgit reset --hard HEAD^\n' span_id:414) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:415) (Token id:Id.Lit_Chars val:'\t(\n' span_id:416) 
          (Token id:Id.Lit_Chars val:'\t\tcd test8 &&\n' span_id:417) (Token id:Id.Lit_Chars val:'\t\tgit fetch --all --tags &&\n' span_id:418) 
          (Token id:Id.Lit_Chars val:'\t\tgit tag >output\n' span_id:419) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:420) 
          (Token id:Id.Lit_Chars val:'\ttest_cmp expect test8/output\n' span_id:421)
        )
      }
    )
    (C {(test_done)})
  ]
)