X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=t%2Ft7001-mv.sh;h=811a4797a58dbc3411f885535b90e6df99f06334;hb=b9895c06882c0e395a2d22c3649e53bd342b535e;hp=43d74c502e60ac55236fa6e36dcf429d38c3b01b;hpb=5401f3040b61e11da79d676e42aacfa9f1131083;p=git.git diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh index 43d74c50..811a4797 100755 --- a/t/t7001-mv.sh +++ b/t/t7001-mv.sh @@ -11,17 +11,31 @@ test_expect_success \ git-commit -m add -a' test_expect_success \ - 'moving the file' \ + 'moving the file out of subdirectory' \ 'cd path0 && git-mv COPYING ../path1/COPYING' # in path0 currently test_expect_success \ 'commiting the change' \ - 'cd .. && git-commit -m move -a' + 'cd .. && git-commit -m move-out -a' test_expect_success \ 'checking the commit' \ 'git-diff-tree -r -M --name-status HEAD^ HEAD | \ grep -E "^R100.+path0/COPYING.+path1/COPYING"' +test_expect_success \ + 'moving the file back into subdirectory' \ + 'cd path0 && git-mv ../path1/COPYING COPYING' + +# in path0 currently +test_expect_success \ + 'commiting the change' \ + 'cd .. && git-commit -m move-in -a' + +test_expect_success \ + 'checking the commit' \ + 'git-diff-tree -r -M --name-status HEAD^ HEAD | \ + grep -E "^R100.+path1/COPYING.+path0/COPYING"' + test_done