diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-11-11 14:04:06 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-11-11 14:16:46 -0200 |
commit | 7013bd760e1ad46b31c019e0a11df504d6e2563e (patch) | |
tree | 133d4942b58deeaae1fcb2057604e72763d75c51 /tests/QtCore/qbytearray_test.py | |
parent | 2a4ee1675dd798d5a50363fb073e6801d45a8d17 (diff) |
Fix bug#455 - "QByteArray.data() cuts data to first '\x00' char"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/QtCore/qbytearray_test.py')
-rw-r--r-- | tests/QtCore/qbytearray_test.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/QtCore/qbytearray_test.py b/tests/QtCore/qbytearray_test.py index 1c425b8e9..2c0ee87ce 100644 --- a/tests/QtCore/qbytearray_test.py +++ b/tests/QtCore/qbytearray_test.py @@ -42,6 +42,12 @@ class QByteArrayData(unittest.TestCase): url = QByteArray("http://web.openbossa.org/") self.assertEqual(url.data(), "http://web.openbossa.org/") + def testDataWithZeros(self): + s1 = "123\000321" + ba = QByteArray(s1) + s2 = ba.data() + self.assertEqual(s1, s2) + class QByteArrayOperatorAtSetter(unittest.TestCase): '''Test case for operator QByteArray[] - __setitem__''' |