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>
Stefan Moch committed
Dec 31, 2017 at 20:11 UTC
36b78cd9db97f3665935e4b32ff9566e4bbd0d17
1 file changed
+6
t/t7001-mv.sh
+6
@@ -38,6 +38,12 @@ test_expect_success \
38
'git diff-tree -r -M --name-status HEAD^ HEAD | \
39
grep "^R100..*path1/COPYING..*path0/COPYING"'
40
41
+test_expect_success \
42
+ 'mv --dry-run does not move file' \
43
+ 'git mv -n path0/COPYING MOVED &&
44
+ test -f path0/COPYING &&
45
+ test ! -f MOVED'
46
+
47
test_expect_success \
48
'checking -k on non-existing file' \
49
'git mv -k idontexist path0'