(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <'test various @{X} syntax combinations together'>)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (FuncDef name: check body: (BraceGroup children: [ (C {(test_expect_) (BracedVarSub token: <VSub_Number 4> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(success)}) spids: [22 26] ) } {(DQ ($ VSub_Number '$1') (' = ') ($ VSub_Number '$3'))} { (DQ ('\n') ("\t\techo '") ($ VSub_Number '$3') ("' >expect &&\n") ("\t\tif test '") ($ VSub_Number '$2') ("' = 'commit'\n") ('\t\tthen\n') ("\t\t\tgit log -1 --format=%s '") ($ VSub_Number '$1') ("' >actual\n") ("\t\telif test '") ($ VSub_Number '$2') ("' = 'ref'\n") ('\t\tthen\n') ("\t\t\tgit rev-parse --symbolic-full-name '") ($ VSub_Number '$1') ("' >actual\n") ('\t\telse\n') ("\t\t\tgit cat-file -p '") ($ VSub_Number '$1') ("' >actual\n") ('\t\tfi &&\n') ('\t\ttest_cmp expect actual\n') ('\t') ) } ) ] spids: [18] ) spids: [14 17] ) (FuncDef name: nonsense body: (BraceGroup children: [ (C {(test_expect_) (BracedVarSub token: <VSub_Number 2> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(success)}) spids: [73 77] ) } {(DQ ($ VSub_Number '$1') (' is nonsensical'))} { (DQ ('\n') ("\t\ttest_must_fail git rev-parse --verify '") ($ VSub_Number '$1') ("'\n") ('\t') ) } ) ] spids: [69] ) spids: [65 68] ) (FuncDef name: fail body: (BraceGroup children:[(C {(DQ ($ VSub_At '$@'))} {(failure)})] spids:[99]) spids: [95 98] ) (C {(test_expect_success)} {(SQ <setup>)} { (SQ <'\n'> <'\ttest_commit master-one &&\n'> <'\ttest_commit master-two &&\n'> <'\tgit checkout -b upstream-branch &&\n'> <'\ttest_commit upstream-one &&\n'> <'\ttest_commit upstream-two &&\n'> <'\tif test_have_prereq !MINGW\n'> <'\tthen\n'> <'\t\tgit checkout -b @/at-test\n'> <'\tfi &&\n'> <'\tgit checkout -b @@/at-test &&\n'> <'\tgit checkout -b @at-test &&\n'> <'\tgit checkout -b old-branch &&\n'> <'\ttest_commit old-one &&\n'> <'\ttest_commit old-two &&\n'> <'\tgit checkout -b new-branch &&\n'> <'\ttest_commit new-one &&\n'> <'\ttest_commit new-two &&\n'> <'\tgit branch -u master old-branch &&\n'> <'\tgit branch -u upstream-branch new-branch\n'> ) } ) (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/) (Lit_Other '@') (Lit_Other '@') (/at-test)}) (AndOr ops: [Op_DPipe] children: [ (C {(test_have_prereq)} {(MINGW)}) (C {(check)} {(DQ ('@/at-test'))} {(ref)} {(refs/heads/) (Lit_Other '@') (/at-test)}) ] ) (C {(check)} {(DQ ('@at-test'))} {(ref)} {(refs/heads/) (Lit_Other '@') (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 <'switch to old-branch'>)} {(SQ <'\n'> <'\tgit checkout old-branch\n'>)} ) (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 <'create path with @'>)} { (SQ <'\n'> <'\techo content >normal &&\n'> <'\techo content >fun@ny &&\n'> <'\tgit add normal fun@ny &&\n'> <'\tgit commit -m "funny path"\n'> ) } ) (C {(check)} {(DQ ('@:normal'))} {(blob)} {(content)}) (C {(check)} {(DQ ('@:fun@ny'))} {(blob)} {(content)}) (C {(test_done)}) ] )