diff options
Diffstat (limited to 'test/rexml/parser')
-rw-r--r-- | test/rexml/parser/test_tree.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/rexml/parser/test_tree.rb b/test/rexml/parser/test_tree.rb index 7720e9531a..6754e6bb59 100644 --- a/test/rexml/parser/test_tree.rb +++ b/test/rexml/parser/test_tree.rb @@ -17,6 +17,19 @@ Last 80 unconsumed characters: MESSAGE end + def test_no_close_tag + xml = "<root>" + exception = assert_raise(REXML::ParseException) do + parse(xml) + end + assert_equal(<<-MESSAGE, exception.to_s) +No close tag for /root +Line: 1 +Position: #{xml.bytesize} +Last 80 unconsumed characters: + MESSAGE + end + private def parse(xml) document = REXML::Document.new |