summaryrefslogtreecommitdiff
path: root/simplejson/tests/test_scanstring.py
diff options
context:
space:
mode:
authorBob Ippolito <bob@redivi.com>2023-04-04 09:59:33 -0700
committerBob Ippolito <bob@redivi.com>2023-04-04 09:59:33 -0700
commit7c2ccb773ab9343e25f14d72356dab75420e288f (patch)
tree5f8370a129f71fc30c632c9e411681c09de30b68 /simplejson/tests/test_scanstring.py
parent9559fc756deaf20b6bae961b58c5289d8582c8b7 (diff)
downloadsimplejson-7c2ccb773ab9343e25f14d72356dab75420e288f.tar.gz
SJ-PT-23-01: Fix invalid handling of unicode escape sequences in Python decoder
Diffstat (limited to 'simplejson/tests/test_scanstring.py')
-rw-r--r--simplejson/tests/test_scanstring.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/simplejson/tests/test_scanstring.py b/simplejson/tests/test_scanstring.py
index c6c53b8..1f54483 100644
--- a/simplejson/tests/test_scanstring.py
+++ b/simplejson/tests/test_scanstring.py
@@ -132,7 +132,9 @@ class TestScanString(TestCase):
self.assertRaises(ValueError,
scanstring, '\\ud834\\x0123"', 0, None, True)
- self.assertRaises(json.JSONDecodeError, scanstring, "\\u-123", 0, None, True)
+ self.assertRaises(json.JSONDecodeError, scanstring, '\\u-123"', 0, None, True)
+ # SJ-PT-23-01: Invalid Handling of Broken Unicode Escape Sequences
+ self.assertRaises(json.JSONDecodeError, scanstring, '\\u EDD"', 0, None, True)
def test_issue3623(self):
self.assertRaises(ValueError, json.decoder.scanstring, "xxx", 1,