We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 794e4a3 commit 3b38ab9Copy full SHA for 3b38ab9
test/json/json_generator_test.rb
@@ -504,6 +504,18 @@ def test_backslash
504
json = '["\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\""]'
505
assert_equal json, generate(data)
506
#
507
+ data = '"""""'
508
+ json = '"\"\"\"\"\""'
509
+ assert_equal json, generate(data)
510
+ #
511
+ data = "abc\n"
512
+ json = '"abc\\n"'
513
514
515
+ data = "\nabc"
516
+ json = '"\\nabc"'
517
518
519
data = ["'"]
520
json = '["\\\'"]'
521
assert_equal '["\'"]', generate(data)
0 commit comments