[flori/json] test parsing of unicode, mixing literal characters with escaped

https://github.com/flori/json/commit/82fe866da2
This commit is contained in:
Ethan 2021-10-20 13:53:18 -07:00 committed by Hiroshi SHIBATA
parent 66b52f046f
commit b2cc74a50d
Notes: git 2022-07-29 19:10:30 +09:00

View File

@ -115,6 +115,10 @@ class JSONParserTest < Test::Unit::TestCase
assert_equal(BigDecimal("0.901234567890123456789E1"),JSON.parse('{"foo": 9.01234567890123456789}', decimal_class: BigDecimal)["foo"] ) assert_equal(BigDecimal("0.901234567890123456789E1"),JSON.parse('{"foo": 9.01234567890123456789}', decimal_class: BigDecimal)["foo"] )
end end
def test_parse_string_mixed_unicode
assert_equal(["éé"], JSON.parse("[\"\\u00e9é\"]"))
end
if Array.method_defined?(:permutation) if Array.method_defined?(:permutation)
def test_parse_more_complex_arrays def test_parse_more_complex_arrays
a = [ nil, false, true, "foßbar", [ "n€st€d", true ], { "nested" => true, "n€ßt€ð2" => {} }] a = [ nil, false, true, "foßbar", [ "n€st€d", true ], { "nested" => true, "n€ßt€ð2" => {} }]