summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Moch <stefanmoch@mail.de>2017-12-31 19:11:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-07 19:43:34 (GMT)
commit36b78cd9db97f3665935e4b32ff9566e4bbd0d17 (patch)
treef5d3a73b55aa3ef515acb9e708fd0096d8e86b31
parentfc849d8d6b90e5c1e0c37bc0d60dd92b2fe7347f (diff)
downloadgit-36b78cd9db97f3665935e4b32ff9566e4bbd0d17.zip
git-36b78cd9db97f3665935e4b32ff9566e4bbd0d17.tar.gz
git-36b78cd9db97f3665935e4b32ff9566e4bbd0d17.tar.bz2
t7001: add test case for --dry-run
Make sure that "git mv --dry-run" does not move file. Signed-off-by: Stefan Moch <stefanmoch@mail.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t7001-mv.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index e365d1f..1744ed4 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -39,6 +39,12 @@ test_expect_success \
grep "^R100..*path1/COPYING..*path0/COPYING"'
test_expect_success \
+ 'mv --dry-run does not move file' \
+ 'git mv -n path0/COPYING MOVED &&
+ test -f path0/COPYING &&
+ test ! -f MOVED'
+
+test_expect_success \
'checking -k on non-existing file' \
'git mv -k idontexist path0'