summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-09 00:56:45 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-09 00:56:45 +0000
commitb90076e85c3b2e29a4e6bd56b01c03d77b2bc1cd (patch)
tree46a001d110ecf9a0cca52fda5eb2aae2650696e6 /test
parent73b046d0f135204dd63a9d1ae344bfd0e1a45c55 (diff)
* ext/psych/lib/psych/visitors/yaml_tree.rb: dumping strings with
quotes should not have changed. [ruby-core:59316] [Bug #9300] * ext/psych/lib/psych.rb: fixed missing require. * test/psych/test_string.rb: test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_string.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/psych/test_string.rb b/test/psych/test_string.rb
index 84326da8d3..01fc0e4bb0 100644
--- a/test/psych/test_string.rb
+++ b/test/psych/test_string.rb
@@ -15,6 +15,10 @@ module Psych
end
end
+ def test_no_doublequotes_with_special_characters
+ assert_equal 2, Psych.dump(%Q{<%= ENV["PATH"] %>}).count('"')
+ end
+
def test_doublequotes_when_there_is_a_single
yaml = Psych.dump "@123'abc"
assert_match(/---\s*"/, yaml)