diff tests/test_utility_commands.py @ 550:f0159775e0f1

utility_commands: fix hg svn genignore for single-directory mode
author Augie Fackler <durin42@gmail.com>
date Sat, 06 Feb 2010 11:13:55 -0600
parents b97f5734e5a8
children 00393e9abff8
line wrap: on
line diff
--- a/tests/test_utility_commands.py
+++ b/tests/test_utility_commands.py
@@ -212,6 +212,15 @@ class UtilityTests(test_util.TestBase):
         self.assertEqual(open(os.path.join(self.wc_path, '.hgignore')).read(),
                          '.hgignore\nsyntax:glob\nblah\notherblah\nbaz/magic\n')
 
+    def test_genignore_single(self):
+        self._load_fixture_and_fetch('ignores.svndump', subdir='trunk')
+        hg.update(self.repo, 'tip')
+        u = ui.ui()
+        u.pushbuffer()
+        utility_commands.genignore(u, self.repo, self.wc_path)
+        self.assertStringEqual(open(os.path.join(self.wc_path, '.hgignore')).read(),
+                               '.hgignore\nsyntax:glob\nblah\notherblah\nbaz/magic\n')
+
     def test_list_authors(self):
         test_util.load_svndump_fixture(self.repo_path,
                                        'replace_trunk_with_branch.svndump')