diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-28 02:25:31 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-28 02:25:31 +0000 |
commit | 4676e643aae73a39e8ecf848c8c63a4be99e85a6 (patch) | |
tree | fb72c733d348e8c6a04dbd4344b07e9980ef864d /test/psych | |
parent | a0e5aea08a2fa738b4b3aa7732022dfb86ea0ba3 (diff) |
merges r30628 from trunk into ruby_1_9_2.
--
* ext/psych/parser.c (parse): fixing off-by-one error on line numbers
in parse exceptions. [ruby-core:34690]
* test/psych/test_parser.rb: test for error
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/psych')
-rw-r--r-- | test/psych/test_parser.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/psych/test_parser.rb b/test/psych/test_parser.rb index 9ef2a41e1d..6df474e620 100644 --- a/test/psych/test_parser.rb +++ b/test/psych/test_parser.rb @@ -46,6 +46,21 @@ module Psych end end + # ruby-core:34690 + def test_exception_line + e = assert_raises(Psych::SyntaxError) do + @parser.parse(<<-eoyaml) +# based on "SGML/XML character entity reference" at http://www.bitjungle.com/isoent/ +# +--- +#DOUBLE LOW-9 QUOTATION MARK +#requires fontenc:T1 +ldquor: ,, + eoyaml + end + assert_match 'line 6', e.message + end + def test_mapping_end @parser.parse("---\n!!map { key: value }") assert_called :end_mapping |