summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2008-05-21 12:04:34 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-05-21 12:04:41 -0700
commit38ed1d89f759699de56004b08668e1764613f47b (patch)
tree40001e7853adba4204423a49ab9fb131df322b1c /t
parentMakefile: update the default build options for AIX (diff)
downloadtgif-38ed1d89f759699de56004b08668e1764613f47b.tar.xz
"git-add -n -u" should not add but just report
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-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