diff options
Diffstat (limited to 'test/psych')
-rw-r--r-- | test/psych/test_yaml.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/psych/test_yaml.rb b/test/psych/test_yaml.rb index cbda3859e6..5e1ebb4b4b 100644 --- a/test/psych/test_yaml.rb +++ b/test/psych/test_yaml.rb @@ -1271,4 +1271,10 @@ EOY yaml = Psych.dump("multi\nline\nstring") assert_match("|", yaml) end + + 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 end |