Extend testing git-mv for renaming of subdirectories
authorJosef Weidendorfer <Josef.Weidendorfer@gmx.de>
Wed, 26 Jul 2006 13:44:08 +0000 (15:44 +0200)
committerJunio C Hamano <junkio@cox.net>
Wed, 26 Jul 2006 18:05:44 +0000 (11:05 -0700)
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
t/t7001-mv.sh

index 811a4797a58dbc3411f885535b90e6df99f06334..d78c56a2eb6f0a11293b6268da4d993c45a2126f 100755 (executable)
@@ -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