X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft2200-add-update.sh;h=f57a6e077c3b85dcdedc3f4813150feebc8e647d;hb=ac083c47ea226b470afab39d975e718a475a3c78;hp=b664341926071a3286ba949dc09b5e62b280e79a;hpb=d6d96f835cace1c108100cf88e216a59debcb937;p=git.git diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh index b66434192..f57a6e077 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