[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: [PATCH 1/2] Add test case for mv --dry-run to t7001-mv.sh
From: Stefan Moch <stefanmoch () mail ! de>
Date: 2017-12-31 19:11:55
Message-ID: 20171231191156.28359-2-stefanmoch () mail ! de
[Download RAW message or body]
It checks if mv --dry-run does not move file.
Signed-off-by: Stefan Moch <stefanmoch@mail.de>
---
t/t7001-mv.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 6e5031f56..d4e6485a2 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -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'
--
2.14.3
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic