Thank you, Edward.
Now that unit tests work, I'm suggesting a simple regression test for
unicode issues that happened in the past. Actually, I found the bug
that you've just fixed when trying to write this test.
headline: @test unicode-test
body:
--- cut here ---
root = p.copy()
while p.hasChildren():
p.firstChild().doDelete(newNode = None)
try:
p1 = p.insertAsLastChild()
koi8rtxt = '\xd4\xc5\xd3\xd4' # the word 'test' in Russian, koi8-r
unicodetxt = unicode(koi8rtxt, 'koi8-r')
p1.setBodyString(unicodetxt)
c.selectPosition(p1)
c.copyOutline()
c.pasteOutline()
p2 = p1.next()
self.assertEqual(p1.bodyString(), p2.bodyString())
finally:
if 1:
while root.hasChildren():
root.firstChild().doDelete(newNode = None)
c.redraw_now()
--- cut here ---
This test passes with current trunk, because unicode bugs are fixed
now. To see it failing, revert the trunk to a revision that had
unicode issues. For example, do:
$ bzr revert -r2741
then run leo, paste this test into an outline and run it with 'run-
unit-tests-locally'. You'll see that the test fails.
I didn't commit the test to the trunk because I don't know how it'll
behave with python3. Running leo with python3 is unfortunately not an
option for me at this time, since building pyqt for python3 would take
almost a whole day.
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.