aboutsummaryrefslogtreecommitdiff
path: root/t/t2200-add-update.sh
diff options
context:
space:
mode:
authorChris Packham <judge.packham@gmail.com>2010-02-09 17:30:48 -0500
committerJunio C Hamano <gitster@pobox.com>2010-02-16 22:53:40 -0800
commit1e7ef746d3a635742690817fefe00b66a044dfe5 (patch)
tree5379ff99f9d1dfd23cf20624739444a60979c71c /t/t2200-add-update.sh
parent81f45e7dc4e930ffc17dce3e377e6adc3eb3d8de (diff)
downloadgit-1e7ef746d3a635742690817fefe00b66a044dfe5.tar.gz
git-1e7ef746d3a635742690817fefe00b66a044dfe5.tar.xz
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/t2200-add-update.sh')
-rwxr-xr-xt/t2200-add-update.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh
index 912075063..2ad2819a3 100755
--- a/t/t2200-add-update.sh
+++ b/t/t2200-add-update.sh
@@ -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