diff options
author | Ethan <ethan@unth.net> | 2021-10-20 13:53:18 -0700 |
---|---|---|
committer | Ethan <ethan@unth.net> | 2022-02-08 16:46:12 -0800 |
commit | 82fe866da296c5ab73157b85eebe0483b818ad8e (patch) | |
tree | c04011c3ab9f343b55062dc09224552674c447df | |
parent | 75ada77b9664c1d1f0ae6e210f8db4919849561e (diff) | |
download | json-82fe866da296c5ab73157b85eebe0483b818ad8e.tar.gz |
test parsing of unicode, mixing literal characters with escaped
-rw-r--r-- | tests/json_parser_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/json_parser_test.rb b/tests/json_parser_test.rb index dce693e..01da048 100644 --- a/tests/json_parser_test.rb +++ b/tests/json_parser_test.rb @@ -114,6 +114,10 @@ class JSONParserTest < Test::Unit::TestCase 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" => {} }] |