diff options
author | Chris Packham <judge.packham@gmail.com> | 2010-02-10 01:30:48 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-02-17 09:53:40 +0300 |
commit | 1e7ef746d3a635742690817fefe00b66a044dfe5 (patch) | |
tree | 5379ff99f9d1dfd23cf20624739444a60979c71c /t/t3700-add.sh | |
parent | 81f45e7dc4e930ffc17dce3e377e6adc3eb3d8de (diff) |
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>
Diffstat (limited to 't/t3700-add.sh')
-rwxr-xr-x | t/t3700-add.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t3700-add.sh b/t/t3700-add.sh index 85eb0fbf96..525c9a8fdf 100755 --- a/t/t3700-add.sh +++ b/t/t3700-add.sh @@ -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 |