Skip to content

Commit 2fc3c61

Browse files
committed
Restore test_parse_malformated_unicode_escapes
1 parent 2074f0c commit 2fc3c61

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

test/json/json_parser_test.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,13 @@ def test_parse_leading_slash
673673
end
674674
end
675675

676+
def test_parse_malformated_unicode_escapes
677+
assert_equal "�|", JSON.parse('"\\u1gef|"')
678+
assert_equal "�|", JSON.parse('"\\u12ge|"')
679+
assert_equal "�|", JSON.parse('"\\u123g|"')
680+
assert_equal '�\\\\"', JSON.parse('"\\u1\\\\\\\\\\\\\\\\"')
681+
end
682+
676683
private
677684

678685
def string_deduplication_available?

0 commit comments

Comments
 (0)