summaryrefslogtreecommitdiff
path: root/test/json
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-12 00:21:18 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-12 00:21:18 +0000
commit83735ba29a0bfdaffa8e9c2a1dc025c3b0b63153 (patch)
tree9b21ea0f749a3a504350f4c9351664bb3cd46dbb /test/json
parent76ab146ca36a2248a1173a6d6e9d6b6edfa46754 (diff)
Merge json-2.0.4.
* https://github.com/flori/json/releases/tag/v2.0.4 * https://github.com/flori/json/blob/09fabeb03e73ed88dc8ce8f19d76ac59e51dae20/CHANGES.md#2017-03-23-204 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/json')
-rw-r--r--test/json/json_encoding_test.rb2
-rw-r--r--[-rwxr-xr-x]test/json/json_generator_test.rb0
2 files changed, 2 insertions, 0 deletions
diff --git a/test/json/json_encoding_test.rb b/test/json/json_encoding_test.rb
index 29ae02e..4e086ef 100644
--- a/test/json/json_encoding_test.rb
+++ b/test/json/json_encoding_test.rb
@@ -79,6 +79,8 @@ class JSONEncodingTest < Test::Unit::TestCase
json = '["\ud840\udc01"]'
assert_equal json, generate(utf8, :ascii_only => true)
assert_equal utf8, parse(json)
+ assert_raises(JSON::ParserError) { parse('"\u"') }
+ assert_raises(JSON::ParserError) { parse('"\ud800"') }
end
def test_chars
diff --git a/test/json/json_generator_test.rb b/test/json/json_generator_test.rb
index 86be398..86be398 100755..100644
--- a/test/json/json_generator_test.rb
+++ b/test/json/json_generator_test.rb