t/t5505-remote: test failure of set-head
The test coverage was missing a test for the failure branch of remote set-head auto's output. Add the missing text and while we are at it, correct a small grammatical mistake in the error's output ("setup" is the noun, "set up" is the verb). Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
54d820d7d4
commit
2fd5555895
@ -432,6 +432,18 @@ test_expect_success 'set-head --auto' '
|
|||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success REFFILES 'set-head --auto failure' '
|
||||||
|
test_when_finished "rm -f test/.git/refs/remotes/origin/HEAD.lock" &&
|
||||||
|
(
|
||||||
|
cd test &&
|
||||||
|
touch .git/refs/remotes/origin/HEAD.lock &&
|
||||||
|
test_must_fail git remote set-head --auto origin 2>err &&
|
||||||
|
tail -n1 err >output &&
|
||||||
|
echo "error: Could not set up refs/remotes/origin/HEAD" >expect &&
|
||||||
|
test_cmp expect output
|
||||||
|
)
|
||||||
|
'
|
||||||
|
|
||||||
test_expect_success 'set-head --auto has no problem w/multiple HEADs' '
|
test_expect_success 'set-head --auto has no problem w/multiple HEADs' '
|
||||||
(
|
(
|
||||||
cd test &&
|
cd test &&
|
||||||
|
Reference in New Issue
Block a user