diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/psych/test_parser.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/psych/test_parser.rb b/test/psych/test_parser.rb index cd22914d3b..ca69b1a1e3 100644 --- a/test/psych/test_parser.rb +++ b/test/psych/test_parser.rb @@ -128,6 +128,16 @@ module Psych end end + def test_syntax_error_twice + assert_raises(Psych::SyntaxError) do + @parser.parse("---\n\"foo\"\n\"bar\"\n") + end + + assert_raises(Psych::SyntaxError) do + @parser.parse("---\n\"foo\"\n\"bar\"\n") + end + end + def test_mapping_end @parser.parse("---\n!!map { key: value }") assert_called :end_mapping |