tests/test-convert-mtn
changeset 8050 087cc65bebff
parent 6873 39b4db2ea6ed
child 8099 3cdf4872941a
--- a/tests/test-convert-mtn	Sat Apr 04 20:39:46 2009 -0500
+++ b/tests/test-convert-mtn	Sat Apr 11 23:12:42 2009 +0200
@@ -55,7 +55,16 @@
 mtn drop dir/b
 mtn mv bin bin2
 mtn ci -m 'update2 "with" quotes'
-# Test directory move
+echo '% test directory move'
+mkdir -p dir1/subdir1
+mkdir -p dir1/subdir2_other
+echo file1 > dir1/subdir1/file1
+echo file2 > dir1/subdir2_other/file1
+mtn add dir1/subdir1/file1 dir1/subdir2_other/file1
+mtn ci -m createdir1
+mtn rename dir1/subdir1 dir1/subdir2
+mtn ci -m movedir1
+echo '% test subdirectory move'
 mtn mv dir dir2
 mtn ci -m movedir
 # Test directory removal with empty directory
@@ -85,5 +94,13 @@
 echo % contents
 cat dir2/a
 test -d dir2/dir && echo 'removed dir2/dir is still there!'
+
+echo % file move
+hg log -v -C -r 1 | grep copies
+echo % check directory move
+hg manifest -r 4
+test -d dir1/subdir2 || echo 'new dir1/subdir2 does not exist!'
+test -d dir1/subdir1 && echo 'renamed dir1/subdir1 is still there!'
+hg log -v -C -r 4 | grep copies
 exit 0