(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: 'test various @{X} syntax combinations together'
                  span_id: 6
                )
              )
            }
          spids: [4]
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.ShFunction
      name: check
      body: 
        (command.BraceGroup
          children: [
            (C 
              {(test_expect_) 
                (braced_var_sub
                  token: (Token id:Id.VSub_Number val:4 span_id:23)
                  suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(success)})
                )
              } {(DQ ($ Id.VSub_Number '$1') (' = ') ($ Id.VSub_Number '$3'))} 
              {
                (DQ ('\n') ("\t\techo '") ($ Id.VSub_Number '$3') ("' >expect &&\n") ("\t\tif test '") 
                  ($ Id.VSub_Number '$2') ("' = 'commit'\n") ('\t\tthen\n') ("\t\t\tgit log -1 --format=%s '") ($ Id.VSub_Number '$1') 
                  ("' >actual\n") ("\t\telif test '") ($ Id.VSub_Number '$2') ("' = 'ref'\n") ('\t\tthen\n') 
                  ("\t\t\tgit rev-parse --symbolic-full-name '") ($ Id.VSub_Number '$1') ("' >actual\n") ('\t\telse\n') ("\t\t\tgit cat-file -p '") 
                  ($ Id.VSub_Number '$1') ("' >actual\n") ('\t\tfi &&\n') ('\t\ttest_cmp expect actual\n') ('\t')
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: nonsense
      body: 
        (command.BraceGroup
          children: [
            (C 
              {(test_expect_) 
                (braced_var_sub
                  token: (Token id:Id.VSub_Number val:2 span_id:74)
                  suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(success)})
                )
              } {(DQ ($ Id.VSub_Number '$1') (' is nonsensical'))} 
              {
                (DQ ('\n') ("\t\ttest_must_fail git rev-parse --verify '") ($ Id.VSub_Number '$1') 
                  ("'\n") ('\t')
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: fail
      body: (command.BraceGroup children:[(C {(DQ ($ Id.VSub_At '$@'))} {(failure)})])
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:setup span_id:114))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:118) 
          (Token id:Id.Lit_Chars val:'\ttest_commit master-one &&\n' span_id:119) (Token id:Id.Lit_Chars val:'\ttest_commit master-two &&\n' span_id:120) 
          (Token id:Id.Lit_Chars val:'\tgit checkout -b upstream-branch &&\n' span_id:121) (Token id:Id.Lit_Chars val:'\ttest_commit upstream-one &&\n' span_id:122) 
          (Token id:Id.Lit_Chars val:'\ttest_commit upstream-two &&\n' span_id:123) (Token id:Id.Lit_Chars val:'\tif test_have_prereq !MINGW\n' span_id:124) 
          (Token id:Id.Lit_Chars val:'\tthen\n' span_id:125) (Token id:Id.Lit_Chars val:'\t\tgit checkout -b @/at-test\n' span_id:126) 
          (Token id:Id.Lit_Chars val:'\tfi &&\n' span_id:127) (Token id:Id.Lit_Chars val:'\tgit checkout -b @@/at-test &&\n' span_id:128) 
          (Token id:Id.Lit_Chars val:'\tgit checkout -b @at-test &&\n' span_id:129) (Token id:Id.Lit_Chars val:'\tgit checkout -b old-branch &&\n' span_id:130) 
          (Token id:Id.Lit_Chars val:'\ttest_commit old-one &&\n' span_id:131) (Token id:Id.Lit_Chars val:'\ttest_commit old-two &&\n' span_id:132) 
          (Token id:Id.Lit_Chars val:'\tgit checkout -b new-branch &&\n' span_id:133) (Token id:Id.Lit_Chars val:'\ttest_commit new-one &&\n' span_id:134) 
          (Token id:Id.Lit_Chars val:'\ttest_commit new-two &&\n' span_id:135) (Token id:Id.Lit_Chars val:'\tgit branch -u master old-branch &&\n' span_id:136) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit branch -u upstream-branch new-branch\n'
            span_id: 137
          )
        )
      }
    )
    (C {(check)} {(HEAD)} {(ref)} {(refs/heads/new-branch)})
    (C {(check)} {(DQ ('@{1}'))} {(commit)} {(new-one)})
    (C {(check)} {(DQ ('HEAD@{1}'))} {(commit)} {(new-one)})
    (C {(check)} {(DQ ('@{now}'))} {(commit)} {(new-two)})
    (C {(check)} {(DQ ('HEAD@{now}'))} {(commit)} {(new-two)})
    (C {(check)} {(DQ ('@{-1}'))} {(ref)} {(refs/heads/old-branch)})
    (C {(check)} {(DQ ('@{-1}@{0}'))} {(commit)} {(old-two)})
    (C {(check)} {(DQ ('@{-1}@{1}'))} {(commit)} {(old-one)})
    (C {(check)} {(DQ ('@{u}'))} {(ref)} {(refs/heads/upstream-branch)})
    (C {(check)} {(DQ ('HEAD@{u}'))} {(ref)} {(refs/heads/upstream-branch)})
    (C {(check)} {(DQ ('@{u}@{1}'))} {(commit)} {(upstream-one)})
    (C {(check)} {(DQ ('@{-1}@{u}'))} {(ref)} {(refs/heads/master)})
    (C {(check)} {(DQ ('@{-1}@{u}@{1}'))} {(commit)} {(master-one)})
    (C {(check)} {(DQ ('@'))} {(commit)} {(new-two)})
    (C {(check)} {(DQ ('@@{u}'))} {(ref)} {(refs/heads/upstream-branch)})
    (C {(check)} {(DQ ('@@/at-test'))} {(ref)} 
      {(refs/heads/) (Id.Lit_Other '@') (Id.Lit_Other '@') (/at-test)}
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {(test_have_prereq)} {(MINGW)})
        (C {(check)} {(DQ ('@/at-test'))} {(ref)} {(refs/heads/) (Id.Lit_Other '@') (/at-test)})
      ]
    )
    (C {(check)} {(DQ ('@at-test'))} {(ref)} {(refs/heads/) (Id.Lit_Splice '@at') (-test)})
    (C {(nonsense)} {(DQ ('@{u}@{-1}'))})
    (C {(nonsense)} {(DQ ('@{0}@{0}'))})
    (C {(nonsense)} {(DQ ('@{1}@{u}'))})
    (C {(nonsense)} {(DQ ('HEAD@{-1}'))})
    (C {(nonsense)} {(DQ ('@{-1}@{-1}'))})
    (C {(check)} {(DQ ('HEAD@{3}'))} {(commit)} {(old-two)})
    (C {(nonsense)} {(DQ ('@{3}'))})
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'switch to old-branch' span_id:387))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:391) 
          (Token id:Id.Lit_Chars val:'\tgit checkout old-branch\n' span_id:392)
        )
      }
    )
    (C {(check)} {(HEAD)} {(ref)} {(refs/heads/old-branch)})
    (C {(check)} {(DQ ('HEAD@{1}'))} {(commit)} {(new-two)})
    (C {(check)} {(DQ ('@{1}'))} {(commit)} {(old-one)})
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'create path with @' span_id:428))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:432) 
          (Token id:Id.Lit_Chars val:'\techo content >normal &&\n' span_id:433) (Token id:Id.Lit_Chars val:'\techo content >fun@ny &&\n' span_id:434) 
          (Token id:Id.Lit_Chars val:'\tgit add normal fun@ny &&\n' span_id:435) (Token id:Id.Lit_Chars val:'\tgit commit -m "funny path"\n' span_id:436)
        )
      }
    )
    (C {(check)} {(DQ ('@:normal'))} {(blob)} {(content)})
    (C {(check)} {(DQ ('@:fun@ny'))} {(blob)} {(content)})
    (C {(test_done)})
  ]
)