3 test_description
='test @{-N} syntax'
15 test_expect_success
'setup' '
33 # and 'side' should be the last branch
35 test_expect_success
'@{-1} works' '
36 test_cmp_rev side @{-1}
39 test_expect_success
'@{-1}~2 works' '
40 test_cmp_rev side~2 @{-1}~2
43 test_expect_success
'@{-1}^2 works' '
44 test_cmp_rev side^2 @{-1}^2
47 test_expect_success
'@{-1}@{1} works' '
48 test_cmp_rev side@{1} @{-1}@{1}
51 test_expect_success
'@{-2} works' '
52 test_cmp_rev master @{-2}
55 test_expect_success
'@{-3} fails' '
56 test_must_fail git rev-parse @{-3}