summaryrefslogtreecommitdiff
path: root/t/t2200-add-update.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-05-21 12:04:34 -0700
committerJunio C Hamano <gitster@pobox.com>2008-05-21 12:04:41 -0700
commit38ed1d89f759699de56004b08668e1764613f47b (patch)
tree40001e7853adba4204423a49ab9fb131df322b1c /t/t2200-add-update.sh
parent377d9c409ffe0f0d994b929aeb94716139207b9d (diff)
downloadgit-38ed1d89f759699de56004b08668e1764613f47b.tar.gz
"git-add -n -u" should not add but just report
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2200-add-update.sh')
-rwxr-xr-xt/t2200-add-update.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh
index b664341926..f57a6e077c 100755
--- a/t/t2200-add-update.sh
+++ b/t/t2200-add-update.sh
@@ -111,4 +111,21 @@ test_expect_success 'touch and then add explicitly' '
'
+test_expect_success 'add -n -u should not add but just report' '
+
+ (
+ echo "add '\''check'\''" &&
+ echo "remove '\''top'\''"
+ ) >expect &&
+ before=$(git ls-files -s check top) &&
+ echo changed >>check &&
+ rm -f top &&
+ git add -n -u >actual &&
+ after=$(git ls-files -s check top) &&
+
+ test "$before" = "$after" &&
+ test_cmp expect actual
+
+'
+
test_done