[PATCH 1/5] t1508 (at-combinations): more tests; document failures
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- May 1, 2013, 16:20 UTC
- Message-ID
- <1367425235-14998-2-git-send-email-artagnon@gmail.com>
- In-Reply-To
- <1367425235-14998-1-git-send-email-artagnon@gmail.com>
To emphasize what we're testing in @{1}@{u}, document that @{0}@{0} is also nonsense. This makes it clear that @{<n>} does not resolve to a ref whose upstream we can determine with @{u}/ reflog we can dig with @{0}.
Since HEAD is implicit in @{}, check that HEAD@{} works fine for these cases. It doesn't make sense in @{-<n>} because @{-<n>} cannot be used with anything other than HEAD, and interpret_nth_prior_checkout() hard-codes "HEAD".
Additionally, document bugs in the @-parser by symbolic-ref'ing @ to HEAD and re-running some tests.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> --- t/t1508-at-combinations.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh index d5d6244..efa2a2a 100755 --- a/t/t1508-at-combinations.sh +++ b/t/t1508-at-combinations.sh @@ -39,13 +39,27 @@ test_expect_success 'setup' ' check HEAD new-two check "@{1}" new-one +check "HEAD@{1}" new-one +check "@{now}" new-two +check "HEAD@{now}" new-two check "@{-1}" old-two check "@{-1}@{1}" old-one check "@{u}" upstream-two +check "HEAD@{u}" upstream-two check "@{u}@{1}" upstream-one check "@{-1}@{u}" master-two check "@{-1}@{u}@{1}" master-one nonsense "@{u}@{-1}" +nonsense "@{0}@{0}" nonsense "@{1}@{u}" +nonsense "HEAD@{-1}" + +# Make sure that the @-parser isn't buggy; check things with +# symbolic-ref @ pointing to HEAD. +git symbolic-ref @ HEAD +check "@@{1}" new-one +check "@@{now}" new-two +check "@@{u}" upstream-two failure +nonsense "@@{-1}" test_done
-- 1.8.3.rc0.24.g6456091