Rev 3835: Update the per-repository unicode commit test. in http://bzr.arbash-meinel.com/branches/bzr/1.10-dev/revision_strictness
John Arbash Meinel
john at arbash-meinel.com
Tue Nov 25 17:27:34 GMT 2008
At http://bzr.arbash-meinel.com/branches/bzr/1.10-dev/revision_strictness
------------------------------------------------------------
revno: 3835
revision-id: john at arbash-meinel.com-20081125172714-184bkswbz4bc5ffe
parent: john at arbash-meinel.com-20081125170722-s9bl39idjxylrura
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: revision_strictness
timestamp: Tue 2008-11-25 11:27:14 -0600
message:
Update the per-repository unicode commit test.
We no longer allow '\r' to be passed in, and the test asserted that it was
replaced with '\n' anyway.
-------------- next part --------------
=== modified file 'bzrlib/tests/per_repository/test_repository.py'
--- a/bzrlib/tests/per_repository/test_repository.py 2008-09-17 07:18:20 +0000
+++ b/bzrlib/tests/per_repository/test_repository.py 2008-11-25 17:27:14 +0000
@@ -440,7 +440,6 @@
u'[^\x09\x0A\x0D\u0020-\uD7FF\uE000-\uFFFD]+',
lambda match: match.group(0).encode('unicode_escape'),
message)
- escaped_message= re.sub('\r', '\n', escaped_message)
self.assertEqual(rev.message, escaped_message)
# insist the class is unicode no matter what came in for
# consistency.
@@ -452,8 +451,12 @@
def test_commit_unicode_control_characters(self):
# a unicode message with control characters should roundtrip too.
+ unichars = [unichr(x) for x in range(256)]
+ # '\r' is not directly allowed anymore, as it used to be translated
+ # into '\n' anyway
+ unichars[ord('\r')] = u'\n'
self.assertMessageRoundtrips(
- "All 8-bit chars: " + ''.join([unichr(x) for x in range(256)]))
+ u"All 8-bit chars: " + ''.join(unichars))
def test_check_repository(self):
"""Check a fairly simple repository's history"""
More information about the bazaar-commits
mailing list