summaryrefslogtreecommitdiff
path: root/t/t7001-mv.sh
diff options
context:
space:
mode:
authorJosef Weidendorfer <Josef.Weidendorfer@gmx.de>2006-07-26 13:44:08 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-07-26 18:05:44 (GMT)
commitafd222967c6abedcf75e28fe0e57cd5644f6c865 (patch)
tree8444e7bbfd807bd4e8d8095c858b98938df260c6 /t/t7001-mv.sh
parent96256bba949f43548a0be0af877680eb62b156f6 (diff)
downloadgit-afd222967c6abedcf75e28fe0e57cd5644f6c865.zip
git-afd222967c6abedcf75e28fe0e57cd5644f6c865.tar.gz
git-afd222967c6abedcf75e28fe0e57cd5644f6c865.tar.bz2
Extend testing git-mv for renaming of subdirectories
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't/t7001-mv.sh')
-rwxr-xr-xt/t7001-mv.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 811a479..d78c56a 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -38,4 +38,25 @@ test_expect_success \
'git-diff-tree -r -M --name-status HEAD^ HEAD | \
grep -E "^R100.+path1/COPYING.+path0/COPYING"'
+test_expect_success \
+ 'adding another file' \
+ 'cp ../../README path0/README &&
+ git-add path0/README &&
+ git-commit -m add2 -a'
+
+test_expect_success \
+ 'moving whole subdirectory' \
+ 'git-mv path0 path2'
+
+test_expect_success \
+ 'commiting the change' \
+ 'git-commit -m dir-move -a'
+
+test_expect_success \
+ 'checking the commit' \
+ 'git-diff-tree -r -M --name-status HEAD^ HEAD | \
+ grep -E "^R100.+path0/COPYING.+path2/COPYING" &&
+ git-diff-tree -r -M --name-status HEAD^ HEAD | \
+ grep -E "^R100.+path0/README.+path2/README"'
+
test_done