diff tests/test_fetch_command.py @ 910:312f36a425f0

Ignore invalid utf8 in commit messages Old svn allowed users to include invalid utf8 in their commits. Since there are real repos with said invalid utf8, we need to be able to import them, even if svn won't.
author David Schleimer <dschleimer@fb.com>
date Thu, 17 May 2012 14:15:14 -0700
parents 20e73b5ab6f7
children e252f9355933
line wrap: on
line diff
--- a/tests/test_fetch_command.py
+++ b/tests/test_fetch_command.py
@@ -175,7 +175,8 @@ class TestBasicRepoLayout(test_util.Test
             self.assertEqual(repo[r].hex(), repo2[r].hex())
 
     def test_path_quoting_stupid(self):
-        self.test_path_quoting(True)
+        repo = self.test_path_quoting(True)
+
 
     def test_identical_fixtures(self):
         '''ensure that the non_ascii_path_N fixtures are identical'''
@@ -186,6 +187,12 @@ class TestBasicRepoLayout(test_util.Test
         self.assertMultiLineEqual(open(fixturepaths[0]).read(),
                                   open(fixturepaths[1]).read())
 
+    def test_invalid_message(self):
+        repo = self._load_fixture_and_fetch('invalid_utf8.tar.gz')
+        self.assertEqual(repo[0].description().decode('utf8'),
+                         u'bl\xe5b\xe6rgr\xf8d')
+
+
 class TestStupidPull(test_util.TestBase):
     def test_stupid(self):
         repo = self._load_fixture_and_fetch('two_heads.svndump', stupid=True)