summaryrefslogtreecommitdiff
path: root/test/json
diff options
context:
space:
mode:
authorEthan <ethan@unth.net>2021-10-20 13:53:18 -0700
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2022-07-29 19:10:10 +0900
commitb2cc74a50dd492e95bd76252046c25495f06a586 (patch)
treeec313ae3e23f5ce3091deae87c666414959daec8 /test/json
parent66b52f046f3e4c5d24781a142f9633e07c42d6d9 (diff)
downloadruby-b2cc74a50dd492e95bd76252046c25495f06a586.tar.gz
[flori/json] test parsing of unicode, mixing literal characters with escaped
https://github.com/flori/json/commit/82fe866da2
Diffstat (limited to 'test/json')
-rw-r--r--test/json/json_parser_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/json/json_parser_test.rb b/test/json/json_parser_test.rb
index 00b254fc6a..146ff7c047 100644
--- a/test/json/json_parser_test.rb
+++ b/test/json/json_parser_test.rb
@@ -115,6 +115,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" => {} }]