tests: at-combinations: @{N} versus HEAD@{N}
All the tests so far check that @{N} is the same as HEAD@{N} (for positive N). However, this is not always the case; write a couple of tests for this. [fc: simplify some wording] Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ramkumar Ramachandra committed
May 7, 2013 at 16:55 UTC
723b74ee3e09bfb19b43218da19c52f805bb69ae
1 file changed
+13
t/t1508-at-combinations.sh
+13
@@ -61,4 +61,17 @@ nonsense "@{1}@{u}"
61
nonsense "HEAD@{-1}"
62
nonsense "@{-1}@{-1}"
63
64
+# @{N} versus HEAD@{N}
65
+
66
+check "HEAD@{3}" commit old-two
67
+nonsense "@{3}"
68
+
69
+test_expect_success 'switch to old-branch' '
70
+ git checkout old-branch
71
+'
72
+
73
+check HEAD ref refs/heads/old-branch
74
+check "HEAD@{1}" commit new-two
75
+check "@{1}" commit old-one
76
+
77
test_done