diff tests/test_fetch_branches.py @ 397:1b9d004a8c0a

branches: correctly deal with branch closing directly after copy/rename
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Thu, 11 Jun 2009 18:00:58 +0200
parents af9fc01299b4
children f5222d021665
line wrap: on
line diff
--- a/tests/test_fetch_branches.py
+++ b/tests/test_fetch_branches.py
@@ -68,6 +68,15 @@ class TestFetchBranches(test_util.TestBa
         self.assertEqual(repo['tip'].extra().get('close'), '1')
         self.assertEqual(self.openbranches(repo), ['default'])
 
+    def test_copybeforeclose(self, stupid=False):
+        repo = self._load_fixture_and_fetch('copybeforeclose.svndump', stupid)
+        self.assertEqual(repo['tip'].branch(), 'test')
+        self.assertEqual(repo['test'].extra().get('close'), '1')
+        self.assertEqual(repo['test']['b'].data(), 'a\n')
+
+    def test_copybeforeclose_stupid(self):
+        self.test_copybeforeclose(True)
+
     def test_replace_trunk_with_branch_stupid(self):
         self.test_replace_trunk_with_branch(stupid=True)