diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-09-01 11:38:14 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:50 -0300 |
commit | 8e43e10f4e901851069be5557ec0f3dad72dc954 (patch) | |
tree | 436cc339242a2c169aa35ac9b69d5f3893fe403d /tests | |
parent | 7ee30db078e15913c0a50016deb33113f06aa5dd (diff) |
Fix other QIODevice read functions stopping at null bytes.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/QtCore/bug_994.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/QtCore/bug_994.py b/tests/QtCore/bug_994.py index 74e352c8f..5f12a967b 100644 --- a/tests/QtCore/bug_994.py +++ b/tests/QtCore/bug_994.py @@ -5,6 +5,9 @@ class MyIODevice (QIODevice): def readData(self, amount): return "\0a" * (amount/2) + def readLineData(self, maxSize): + return "\0b" * 4 + def atEnd(self): return False @@ -15,6 +18,7 @@ class TestBug944 (unittest.TestCase): device.open(QIODevice.ReadOnly) s = QTextStream(device) self.assertEqual(s.read(4), "\0a\0a") + self.assertEqual(device.readLine(), "\0b\0b\0b\0b") if __name__ == "__main__": unittest.main() |