tests: at-combinations: improve nonsense()
authorFelipe Contreras <felipe.contreras@gmail.com>
Tue, 7 May 2013 21:55:03 +0000 (16:55 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 8 May 2013 16:15:37 +0000 (09:15 -0700)
In some circumstances 'git log' might fail, but not because the @
parsing failed. For example: 'git rev-parse' might succeed and return a
bad object, and then 'git log' would fail.

The layer we want to test is revision parsing, so let's test that
directly.

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>
t/t1508-at-combinations.sh
index 112612567284413b527829cf000734c7eeaf4e7a..d45a4103627960b79af8b89cb06d05be301d5acc 100755 (executable)
@@ -18,7 +18,7 @@ check() {
 
 nonsense() {
        test_expect_${2:-success} "$1 is nonsensical" "
-               test_must_fail git log -1 '$1'
+               test_must_fail git rev-parse --verify '$1'
        "
 }