summaryrefslogtreecommitdiff
path: root/test/psych/test_string.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-27 03:11:18 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-27 03:11:18 +0000
commitb613a2c5ae03c425bc94771e4eced1b80e4e80d0 (patch)
treea2bd8c92dbafcc5897e4105682517df190e35f3f /test/psych/test_string.rb
parent33201294eb59f10ccb98752207c2cc9d1c8757cc (diff)
Merge psych-3.0.0.beta4 from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/psych/test_string.rb')
-rw-r--r--test/psych/test_string.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/psych/test_string.rb b/test/psych/test_string.rb
index 973f38b9c2..e80d19194b 100644
--- a/test/psych/test_string.rb
+++ b/test/psych/test_string.rb
@@ -37,6 +37,13 @@ module Psych
assert_equal str, Psych.load(yaml)
end
+ def test_doublequotes_when_there_are_single_quotes_only
+ str = "psych: Please don't escape ' with ' here."
+ yaml = Psych.dump str
+ assert_equal "--- \"psych: Please don't escape ' with ' here.\"\n", yaml
+ assert_equal str, Psych.load(yaml)
+ end
+
def test_plain_when_shorten_than_line_width_and_no_final_line_break
str = "Lorem ipsum"
yaml = Psych.dump str, line_width: 12