(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:'previous branch syntax @{-n}' span_id:6))} spids: [4] ) ] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'branch -d @{-1}' span_id:18))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:22) (Token id:Id.Lit_Chars val:'\ttest_commit A &&\n' span_id:23) (Token id:Id.Lit_Chars val:'\tgit checkout -b junk &&\n' span_id:24) (Token id:Id.Lit_Chars val:'\tgit checkout - &&\n' span_id:25) (Token id:Id.Lit_Chars val:'\ttest "$(git symbolic-ref HEAD)" = refs/heads/master &&\n' span_id:26) (Token id:Id.Lit_Chars val:'\tgit branch -d @{-1} &&\n' span_id:27) (Token id:Id.Lit_Chars val:'\ttest_must_fail git rev-parse --verify refs/heads/junk\n' span_id:28) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'branch -d @{-12} when there is not enough switches yet' span_id: 35 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:39) (Token id:Id.Lit_Chars val:'\tgit reflog expire --expire=now &&\n' span_id:40) (Token id:Id.Lit_Chars val:'\tgit checkout -b junk2 &&\n' span_id:41) (Token id:Id.Lit_Chars val:'\tgit checkout - &&\n' span_id:42) (Token id:Id.Lit_Chars val:'\ttest "$(git symbolic-ref HEAD)" = refs/heads/master &&\n' span_id:43) (Token id: Id.Lit_Chars val: '\ttest_must_fail git branch -d @{-12} &&\n' span_id: 44 ) (Token id:Id.Lit_Chars val:'\tgit rev-parse --verify refs/heads/master\n' span_id:45) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'merge @{-1}' span_id:52))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:56) (Token id:Id.Lit_Chars val:'\tgit checkout A &&\n' span_id:57) (Token id:Id.Lit_Chars val:'\ttest_commit B &&\n' span_id:58) (Token id:Id.Lit_Chars val:'\tgit checkout A &&\n' span_id:59) (Token id:Id.Lit_Chars val:'\ttest_commit C &&\n' span_id:60) (Token id:Id.Lit_Chars val:'\ttest_commit D &&\n' span_id:61) (Token id:Id.Lit_Chars val:'\tgit branch -f master B &&\n' span_id:62) (Token id:Id.Lit_Chars val:'\tgit branch -f other &&\n' span_id:63) (Token id:Id.Lit_Chars val:'\tgit checkout other &&\n' span_id:64) (Token id:Id.Lit_Chars val:'\tgit checkout master &&\n' span_id:65) (Token id:Id.Lit_Chars val:'\tgit merge @{-1} &&\n' span_id:66) (Token id: Id.Lit_Chars val: '\tgit cat-file commit HEAD | grep "Merge branch ' span_id: 67 ) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:"\\'" span_id:69)) (SQ (Token id:Id.Lit_Chars val:other span_id:71)) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:"\\'" span_id:73)) (SQ (Token id:Id.Lit_Chars val:'"\n' span_id:75)) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'merge @{-1}~1' span_id:82))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:86) (Token id:Id.Lit_Chars val:'\tgit checkout master &&\n' span_id:87) (Token id:Id.Lit_Chars val:'\tgit reset --hard B &&\n' span_id:88) (Token id:Id.Lit_Chars val:'\tgit checkout other &&\n' span_id:89) (Token id:Id.Lit_Chars val:'\tgit checkout master &&\n' span_id:90) (Token id:Id.Lit_Chars val:'\tgit merge @{-1}~1 &&\n' span_id:91) (Token id:Id.Lit_Chars val:'\tgit cat-file commit HEAD >actual &&\n' span_id:92) (Token id:Id.Lit_Chars val:'\tgrep "Merge branch ' span_id:93) ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:"\\'" span_id:95)) (SQ (Token id:Id.Lit_Chars val:other span_id:97)) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:"\\'" span_id:99)) (SQ (Token id:Id.Lit_Chars val:'" actual\n' span_id:101)) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'merge @{-100} before checking out that many branches yet' span_id: 108 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:112) (Token id:Id.Lit_Chars val:'\tgit reflog expire --expire=now &&\n' span_id:113) (Token id:Id.Lit_Chars val:'\tgit checkout -f master &&\n' span_id:114) (Token id:Id.Lit_Chars val:'\tgit reset --hard B &&\n' span_id:115) (Token id:Id.Lit_Chars val:'\tgit branch -f other C &&\n' span_id:116) (Token id:Id.Lit_Chars val:'\tgit checkout other &&\n' span_id:117) (Token id:Id.Lit_Chars val:'\tgit checkout master &&\n' span_id:118) (Token id:Id.Lit_Chars val:'\ttest_must_fail git merge @{-100}\n' span_id:119) ) } ) (C {(test_done)}) ] )