Fix bug#455 - "QByteArray.data() cuts data to first '\x00' char"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
parent
2a4ee1675d
commit
7013bd760e
2 changed files with 12 additions and 0 deletions
|
|
@ -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__'''
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue