Skip to content

Commit

Permalink
t1400: fix name and expected result of one test
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Haggerty authored and Junio C Hamano committed Apr 7, 2014
1 parent 25d1ac0 commit b984d33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t/t1400-update-ref.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
'

Expand Down

0 comments on commit b984d33

Please sign in to comment.