(REXMLTests::TestDocument::EntityExpansionLimitTest):
  Use one test method for one test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2014-11-15 11:40:47 +00:00
Родитель a895babbff
Коммит a5406b873c
2 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@ -1,3 +1,9 @@
Sat Nov 15 20:39:06 2014 Kouhei Sutou <kou@cozmixng.org>
* test/rexml/test_document.rb
(REXMLTests::TestDocument::EntityExpansionLimitTest): Use
one test method for one test.
Sat Nov 15 20:16:59 2014 Kouhei Sutou <kou@cozmixng.org>
* test/rexml/test_document.rb

Просмотреть файл

@ -114,7 +114,7 @@ EOF
</member>
EOF
def test_entity_expansion_limit
def test_general_entity_have_value
doc = REXML::Document.new(XML_WITH_NESTED_ENTITY)
assert_raise(RuntimeError) do
doc.root.children.first.value
@ -126,7 +126,9 @@ EOF
doc.root.children.first.value
end
assert_equal(101, doc.entity_expansion_count)
end
def test_general_entity_empty_value
doc = REXML::Document.new(XML_WITH_NESTED_EMPTY_ENTITY)
assert_raise(RuntimeError) do
doc.root.children.first.value
@ -138,7 +140,9 @@ EOF
doc.root.children.first.value
end
assert_equal(101, doc.entity_expansion_count)
end
def test_general_entity_with_default_entity
REXML::Security.entity_expansion_limit = 4
doc = REXML::Document.new(XML_WITH_4_ENTITY_EXPANSION)
assert_equal("\na\na a\n<\n", doc.root.children.first.value)
@ -149,7 +153,7 @@ EOF
end
end
def test_entity_expansion_limit_for_parameter_entity
def test_parameter_entity_have_value
assert_raise(REXML::ParseException) do
REXML::Document.new(XML_WITH_NESTED_PARAMETER_ENTITY)
end
@ -158,7 +162,9 @@ EOF
assert_raise(REXML::ParseException) do
REXML::Document.new(XML_WITH_NESTED_PARAMETER_ENTITY)
end
end
def test_parameter_entity_empty_value
assert_raise(REXML::ParseException) do
REXML::Document.new(XML_WITH_NESTED_EMPTY_PARAMETER_ENTITY)
end