From e9de49255b6b4a1749b729a02e9fe643c66a042f Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Thu, 1 Sep 2011 14:26:33 -0300 Subject: Fix QAbstractFileEngine read and readLine methods to accept data with null bytes. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewer: Marcelo Lira Renato Araújo --- tests/QtCore/bug_723.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/QtCore') 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() -- cgit v1.2.3