Skip to content

Commit 232902c

Browse files
committed
Add testcases for hex escape parse failures
1 parent 5abdc32 commit 232902c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/llsd_test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,11 @@ def testParseNotationUnterminatedString(self):
513513
"""
514514
self.assertRaises(llsd.LLSDParseError, self.llsd.parse, b"'foo")
515515

516+
def testParseNotationTruncatedHex(self):
517+
self.assertRaises(llsd.LLSDParseError, self.llsd.parse, b"'\\xf")
518+
519+
def testParseNotationInvalidHex(self):
520+
self.assertRaises(llsd.LLSDParseError, self.llsd.parse, b"'\\xzz'")
516521

517522
class LLSDBinaryUnitTest(unittest.TestCase):
518523
"""

0 commit comments

Comments
 (0)