summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-02-02 11:15:44 +0100
committerJelmer Vernooij <jelmer@samba.org>2011-02-02 11:15:44 +0100
commit801b2da38d8df513b93cf94455a3ec4c817bfad4 (patch)
tree68b9d0d60bd092427e6136d4b6abe2a59874ca6d /tests
parent76db1c7174544db3223397743d81e9a67802577f (diff)
downloadbzr-fastimport-801b2da38d8df513b93cf94455a3ec4c817bfad4.tar.gz
Cope with non-utf8 characters in commit messages.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_generic_processor.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_generic_processor.py b/tests/test_generic_processor.py
index 41f846e..111fd56 100644
--- a/tests/test_generic_processor.py
+++ b/tests/test_generic_processor.py
@@ -1910,3 +1910,20 @@ class TestModifyRevertInBranch(TestCaseForGenericProcessor):
self.assertEqual(rev_b, rtree_b.inventory[foo_id].revision)
self.assertEqual(rev_c, rtree_c.inventory[foo_id].revision)
self.assertEqual(rev_c, rtree_d.inventory[foo_id].revision)
+
+
+class TestCommitCommands(TestCaseForGenericProcessor):
+
+ def test_non_utf8_commit_message(self):
+ handler, branch = self.get_handler()
+ def files_one():
+ yield commands.FileModifyCommand('a',
+ kind_to_mode('file', False), None, "data")
+ def command_list():
+ committer = ['', 'elmer@a.com', time.time(), time.timezone]
+ yield commands.CommitCommand('head', '1', None,
+ committer, 'This is a funky character: \x83', None, [],
+ files_one)
+ handler.process(command_list)
+ rev = branch.repository.get_revision(branch.last_revision())
+ self.assertEquals(u"This is a funky character: \ufffd", rev.message)