From 82fe866da296c5ab73157b85eebe0483b818ad8e Mon Sep 17 00:00:00 2001 From: Ethan Date: Wed, 20 Oct 2021 13:53:18 -0700 Subject: [PATCH] test parsing of unicode, mixing literal characters with escaped --- tests/json_parser_test.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/json_parser_test.rb b/tests/json_parser_test.rb index dce693e5..01da0485 100644 --- a/tests/json_parser_test.rb +++ b/tests/json_parser_test.rb @@ -114,6 +114,10 @@ def test_parse_bigdecimals assert_equal(BigDecimal("0.901234567890123456789E1"),JSON.parse('{"foo": 9.01234567890123456789}', decimal_class: BigDecimal)["foo"] ) end + def test_parse_string_mixed_unicode + assert_equal(["éé"], JSON.parse("[\"\\u00e9é\"]")) + end + if Array.method_defined?(:permutation) def test_parse_more_complex_arrays a = [ nil, false, true, "foßbar", [ "n€st€d", true ], { "nested" => true, "n€ßt€ð2" => {} }]