summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 81f45e7)
raw | patch | inline | side by side (parent: 81f45e7)
author | Chris Packham <judge.packham@gmail.com> | |
Tue, 9 Feb 2010 22:30:48 +0000 (17:30 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 17 Feb 2010 06:53:40 +0000 (22:53 -0800) |
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>
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>
t/t2200-add-update.sh | patch | blob | history | |
t/t3700-add.sh | patch | blob | history |
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh
index 912075063b9946d38a9ff72621cb80bcf2c05399..2ad2819a345af53ff6ab0b7c28fa313f1a0a5956 100755 (executable)
--- a/t/t2200-add-update.sh
+++ b/t/t2200-add-update.sh
'
+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
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index 85eb0fbf96a65ad958422da02ca4975fe687da95..525c9a8fdfb4953612e6946994c8e555f676bfd2 100755 (executable)
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
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