summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-09-27 16:40:06 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2009-09-27 16:40:06 -0700
commit7d3bb196d32afb5f9fe7ec54eb7f7f1c6fb41a86 (patch)
treea57f77ac61a9f015f1b63bfe33b398062a7ae9d2 /test
parent1e1b03f061be4333e2d2a8a4b2b176bcab20a023 (diff)
downloadpsych-7d3bb196d32afb5f9fe7ec54eb7f7f1c6fb41a86.zip
adding yaml syntax error
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_parser.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/psych/test_parser.rb b/test/psych/test_parser.rb
index 3bbd280..d996fe1 100644
--- a/test/psych/test_parser.rb
+++ b/test/psych/test_parser.rb
@@ -24,6 +24,12 @@ module Psych
@parser = Psych::Parser.new EventCatcher.new
end
+ def test_syntax_error
+ 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