t1400: fix name and expected result of one test
authorMichael Haggerty <mhagger@alum.mit.edu>
Mon, 7 Apr 2014 13:47:52 +0000 (15:47 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Apr 2014 19:09:10 +0000 (12:09 -0700)
The test

stdin -z create ref fails with zero new value

actually passes an empty new value, not a zero new value. So rename
the test s/zero/empty/, and change the expected error from

fatal: create $c given zero new value

to

fatal: create $c missing <newvalue>

Of course, this makes the test fail now, because although "git
update-ref" tries to distinguish between these two errors, it does not
succeed in this situation. Fixing it is more than a one-liner, so
mark the test test_expect_failure for now. The failure will be fixed
later in this patch series.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1400-update-ref.sh
index 6ffd82fe321cd3154d6f193c21198218e762f1b2..fa927d21846d64872e6a9d6d4c8acfb822b35957 100755 (executable)
@@ -827,10 +827,10 @@ test_expect_success 'stdin -z create ref fails with bad new value' '
        test_must_fail git rev-parse --verify -q $c
 '
 
-test_expect_success 'stdin -z create ref fails with zero new value' '
+test_expect_failure 'stdin -z create ref fails with empty new value' '
        printf $F "create $c" "" >stdin &&
        test_must_fail git update-ref -z --stdin <stdin 2>err &&
-       grep "fatal: create $c given zero new value" err &&
+       grep "fatal: create $c missing <newvalue>" err &&
        test_must_fail git rev-parse --verify -q $c
 '