diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-09-01 14:26:33 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:50 -0300 |
commit | e9de49255b6b4a1749b729a02e9fe643c66a042f (patch) | |
tree | db7c0f2eafbd64b967bf6c32e4682a4f2d9c058c /tests | |
parent | 8e43e10f4e901851069be5557ec0f3dad72dc954 (diff) |
Fix QAbstractFileEngine read and readLine methods to accept data with null bytes.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/QtCore/bug_723.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/QtCore/bug_723.py b/tests/QtCore/bug_723.py index 68ebeab61..319c04bad 100644 --- a/tests/QtCore/bug_723.py +++ b/tests/QtCore/bug_723.py @@ -5,7 +5,7 @@ class MyFileEngine (QAbstractFileEngine): def __init__(self): QAbstractFileEngine.__init__(self) - self.contents = "Foo bar for the win!" + self.contents = "Foo \0bar for the win!" self.pos = 0 def open(self, mode): @@ -27,7 +27,6 @@ class MyFileEngine (QAbstractFileEngine): class MyFileEngineHandler (QAbstractFileEngineHandler): def create(self, fileName): - print "hey ho: ", fileName if fileName.startswith("foo:/"): return MyFileEngine() return None @@ -42,7 +41,7 @@ class TestBug723 (unittest.TestCase): assert(f.open(QFile.ReadOnly | QFile.Text)) contents = f.readAll() - self.assertEqual(contents, "Foo bar for the win!") + self.assertEqual(contents, "Foo \0bar for the win!") f.close() |