diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/psych/test_psych.rb | 2 | ||||
-rw-r--r-- | test/psych/test_yaml.rb | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb index 99866998e0..66b020a09c 100644 --- a/test/psych/test_psych.rb +++ b/test/psych/test_psych.rb @@ -20,7 +20,7 @@ class TestPsych < Psych::TestCase def test_canonical yml = Psych.dump({:a => {'b' => 'c'}}, {:canonical => true}) - assert_match(/\? ! "b/, yml) + assert_match(/\? "b/, yml) end def test_header diff --git a/test/psych/test_yaml.rb b/test/psych/test_yaml.rb index 5e1ebb4b4b..9891349118 100644 --- a/test/psych/test_yaml.rb +++ b/test/psych/test_yaml.rb @@ -1274,7 +1274,16 @@ EOY def test_string_starting_with_non_word_character_uses_double_quotes_without_exclamation_mark yaml = Psych.dump("@123'abc") - assert_match("\"", yaml) refute_match("!", yaml) end + + def test_string_dump_with_colon + yaml = Psych.dump 'x: foo' + refute_match '!', yaml + end + + def test_string_dump_starting_with_star + yaml = Psych.dump '*foo' + refute_match '!', yaml + end end |