summaryrefslogtreecommitdiff
path: root/test/json/json_generator_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/json/json_generator_test.rb')
-rwxr-xr-x[-rw-r--r--]test/json/json_generator_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/json/json_generator_test.rb b/test/json/json_generator_test.rb
index ee19fa5e6c..13d3b5ab91 100644..100755
--- a/test/json/json_generator_test.rb
+++ b/test/json/json_generator_test.rb
@@ -174,6 +174,7 @@ EOT
:ascii_only => false,
:buffer_initial_length => 1024,
:depth => 0,
+ :escape_slash => false,
:indent => " ",
:max_nesting => 100,
:object_nl => "\n",
@@ -190,6 +191,7 @@ EOT
:ascii_only => false,
:buffer_initial_length => 1024,
:depth => 0,
+ :escape_slash => false,
:indent => "",
:max_nesting => 100,
:object_nl => "",
@@ -206,6 +208,7 @@ EOT
:ascii_only => false,
:buffer_initial_length => 1024,
:depth => 0,
+ :escape_slash => false,
:indent => "",
:max_nesting => 0,
:object_nl => "",
@@ -394,6 +397,10 @@ EOT
json = '["/"]'
assert_equal json, generate(data)
#
+ data = [ '/' ]
+ json = '["\/"]'
+ assert_equal json, generate(data, :escape_slash => true)
+ #
data = ['"']
json = '["\""]'
assert_equal json, generate(data)