summaryrefslogtreecommitdiff
path: root/tests/test_json.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_json.rb')
-rwxr-xr-xtests/test_json.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_json.rb b/tests/test_json.rb
index 5307609..5d71d61 100755
--- a/tests/test_json.rb
+++ b/tests/test_json.rb
@@ -222,27 +222,27 @@ EOT
def test_backslash
data = [ '\\.(?i:gif|jpe?g|png)$' ]
json = '["\\\\.(?i:gif|jpe?g|png)$"]'
- assert_equal json, JSON.unparse(data)
+ assert_equal json, JSON.generate(data)
assert_equal data, JSON.parse(json)
#
data = [ '\\"' ]
json = '["\\\\\""]'
- assert_equal json, JSON.unparse(data)
+ assert_equal json, JSON.generate(data)
assert_equal data, JSON.parse(json)
#
json = '["/"]'
data = JSON.parse(json)
assert_equal ['/'], data
- assert_equal json, JSON.unparse(data)
+ assert_equal json, JSON.generate(data)
#
json = '["\""]'
data = JSON.parse(json)
assert_equal ['"'], data
- assert_equal json, JSON.unparse(data)
+ assert_equal json, JSON.generate(data)
json = '["\\\'"]'
data = JSON.parse(json)
assert_equal ["'"], data
- assert_equal '["\'"]', JSON.unparse(data)
+ assert_equal '["\'"]', JSON.generate(data)
end
def test_wrong_inputs