Skip to content

Commit 82fe866

Browse files
committed
test parsing of unicode, mixing literal characters with escaped
1 parent 75ada77 commit 82fe866

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/json_parser_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ def test_parse_bigdecimals
114114
assert_equal(BigDecimal("0.901234567890123456789E1"),JSON.parse('{"foo": 9.01234567890123456789}', decimal_class: BigDecimal)["foo"] )
115115
end
116116

117+
def test_parse_string_mixed_unicode
118+
assert_equal(["éé"], JSON.parse("[\"\\u00e9é\"]"))
119+
end
120+
117121
if Array.method_defined?(:permutation)
118122
def test_parse_more_complex_arrays
119123
a = [ nil, false, true, "foßbar", [ "n€st€d", true ], { "nested" => true, "n€ßt€ð2" => {} }]

0 commit comments

Comments
 (0)