mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
test for add with non-existent pathspec
Add a test for 'git add -u pathspec' and 'git add pathspec' where pathspec does not exist. The expected result is that git add exits with an error message and an appropriate exit code. Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
81f45e7dc4
commit
1e7ef746d3
|
@ -176,4 +176,9 @@ test_expect_success 'add -u resolves unmerged paths' '
|
|||
|
||||
'
|
||||
|
||||
test_expect_success '"add -u non-existent" should fail' '
|
||||
test_must_fail git add -u non-existent &&
|
||||
! (git ls-files | grep "non-existent")
|
||||
'
|
||||
|
||||
test_done
|
||||
|
|
|
@ -255,4 +255,9 @@ test_expect_success 'git add to resolve conflicts on otherwise ignored path' '
|
|||
git add track-this
|
||||
'
|
||||
|
||||
test_expect_success '"add non-existent" should fail' '
|
||||
test_must_fail git add non-existent &&
|
||||
! (git ls-files | grep "non-existent")
|
||||
'
|
||||
|
||||
test_done
|
||||
|
|
Loading…
Reference in a new issue