Browse Source

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>
maint
Stefan Moch 7 years ago committed by Junio C Hamano
parent
commit
36b78cd9db
  1. 6
      t/t7001-mv.sh

6
t/t7001-mv.sh

@ -38,6 +38,12 @@ test_expect_success \ @@ -38,6 +38,12 @@ test_expect_success \
'git diff-tree -r -M --name-status HEAD^ HEAD | \
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'

Loading…
Cancel
Save