Skip to content

Commit

Permalink
test parsing of unicode, mixing literal characters with escaped
Browse files Browse the repository at this point in the history
  • Loading branch information
notEthan committed Feb 9, 2022
1 parent 75ada77 commit 82fe866
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/json_parser_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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" => {} }]
Expand Down

0 comments on commit 82fe866

Please sign in to comment.