From afd222967c6abedcf75e28fe0e57cd5644f6c865 Mon Sep 17 00:00:00 2001 From: Josef Weidendorfer Date: Wed, 26 Jul 2006 15:44:08 +0200 Subject: [PATCH] Extend testing git-mv for renaming of subdirectories Signed-off-by: Josef Weidendorfer Signed-off-by: Junio C Hamano --- t/t7001-mv.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh index 811a4797a..d78c56a2e 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 -- 2.26.2