[ruby/json] Skip test failing on JRuby
https://github.com/ruby/json/commit/0f0b16b3f5
This commit is contained in:
parent
eb19156a28
commit
88b411464d
@ -196,20 +196,21 @@ class JSONParserTest < Test::Unit::TestCase
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_parse_broken_string
|
if RUBY_ENGINE != "jruby" # https://github.com/ruby/json/issues/138
|
||||||
# https://github.com/ruby/json/issues/138
|
def test_parse_broken_string
|
||||||
s = parse(%{["\x80"]})[0]
|
s = parse(%{["\x80"]})[0]
|
||||||
assert_equal("\x80", s)
|
assert_equal("\x80", s)
|
||||||
assert_equal Encoding::UTF_8, s.encoding
|
assert_equal Encoding::UTF_8, s.encoding
|
||||||
assert_equal false, s.valid_encoding?
|
assert_equal false, s.valid_encoding?
|
||||||
|
|
||||||
s = parse(%{["\x80"]}.b)[0]
|
s = parse(%{["\x80"]}.b)[0]
|
||||||
assert_equal("\x80", s)
|
assert_equal("\x80", s)
|
||||||
assert_equal Encoding::UTF_8, s.encoding
|
assert_equal Encoding::UTF_8, s.encoding
|
||||||
assert_equal false, s.valid_encoding?
|
assert_equal false, s.valid_encoding?
|
||||||
|
|
||||||
input = %{["\x80"]}.dup.force_encoding(Encoding::US_ASCII)
|
input = %{["\x80"]}.dup.force_encoding(Encoding::US_ASCII)
|
||||||
assert_raise(Encoding::InvalidByteSequenceError) { parse(input) }
|
assert_raise(Encoding::InvalidByteSequenceError) { parse(input) }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_parse_big_integers
|
def test_parse_big_integers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user