(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"previous branch syntax @{-n}">)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(SQ <"branch -d @{-1}">)} { (SQ <"\n"> <"\ttest_commit A &&\n"> <"\tgit checkout -b junk &&\n"> <"\tgit checkout - &&\n"> <"\ttest \"$(git symbolic-ref HEAD)\" = refs/heads/master &&\n"> <"\tgit branch -d @{-1} &&\n"> <"\ttest_must_fail git rev-parse --verify refs/heads/junk\n"> ) } ) (C {(test_expect_success)} {(SQ <"branch -d @{-12} when there is not enough switches yet">)} { (SQ <"\n"> <"\tgit reflog expire --expire=now &&\n"> <"\tgit checkout -b junk2 &&\n"> <"\tgit checkout - &&\n"> <"\ttest \"$(git symbolic-ref HEAD)\" = refs/heads/master &&\n"> <"\ttest_must_fail git branch -d @{-12} &&\n"> <"\tgit rev-parse --verify refs/heads/master\n"> ) } ) (C {(test_expect_success)} {(SQ <"merge @{-1}">)} { (SQ <"\n"> <"\tgit checkout A &&\n"> <"\ttest_commit B &&\n"> <"\tgit checkout A &&\n"> <"\ttest_commit C &&\n"> <"\ttest_commit D &&\n"> <"\tgit branch -f master B &&\n"> <"\tgit branch -f other &&\n"> <"\tgit checkout other &&\n"> <"\tgit checkout master &&\n"> <"\tgit merge @{-1} &&\n"> <"\tgit cat-file commit HEAD | grep \"Merge branch "> ) (EscapedLiteralPart token:<Lit_EscapedChar "\\'">) (SQ <other>) (EscapedLiteralPart token:<Lit_EscapedChar "\\'">) (SQ <"\"\n">) } ) (C {(test_expect_success)} {(SQ <"merge @{-1}~1">)} { (SQ <"\n"> <"\tgit checkout master &&\n"> <"\tgit reset --hard B &&\n"> <"\tgit checkout other &&\n"> <"\tgit checkout master &&\n"> <"\tgit merge @{-1}~1 &&\n"> <"\tgit cat-file commit HEAD >actual &&\n"> <"\tgrep \"Merge branch "> ) (EscapedLiteralPart token:<Lit_EscapedChar "\\'">) (SQ <other>) (EscapedLiteralPart token:<Lit_EscapedChar "\\'">) (SQ <"\" actual\n">) } ) (C {(test_expect_success)} {(SQ <"merge @{-100} before checking out that many branches yet">)} { (SQ <"\n"> <"\tgit reflog expire --expire=now &&\n"> <"\tgit checkout -f master &&\n"> <"\tgit reset --hard B &&\n"> <"\tgit branch -f other C &&\n"> <"\tgit checkout other &&\n"> <"\tgit checkout master &&\n"> <"\ttest_must_fail git merge @{-100}\n"> ) } ) (C {(test_done)}) ] )