1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/rexml/test_document.rb

(REXMLTests::TestDocument::EntityExpansionLimitTest):
  Group tests by general entity and parameter entity.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2014-11-15 11:47:34 +00:00
parent a38971c595
commit 64f9f1ba58
2 changed files with 15 additions and 5 deletions

View file

@ -1,3 +1,9 @@
Sat Nov 15 20:46:44 2014 Kouhei Sutou <kou@cozmixng.org>
* test/rexml/test_document.rb
(REXMLTests::TestDocument::EntityExpansionLimitTest):
Group tests by general entity and parameter entity.
Sat Nov 15 20:43:31 2014 Kouhei Sutou <kou@cozmixng.org>
* test/rexml/test_document.rb

View file

@ -41,7 +41,8 @@ EOF
REXML::Security.entity_expansion_limit = @default_entity_expansion_limit
end
def test_general_entity_have_value
class GeneralEntityTest < self
def test_have_value
xml = <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE member [
@ -71,7 +72,7 @@ EOF
assert_equal(101, doc.entity_expansion_count)
end
def test_general_entity_empty_value
def test_empty_value
xml = <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE member [
@ -101,7 +102,7 @@ EOF
assert_equal(101, doc.entity_expansion_count)
end
def test_general_entity_with_default_entity
def test_with_default_entity
xml = <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE member [
@ -124,8 +125,10 @@ EOF
doc.root.children.first.value
end
end
end
def test_parameter_entity_have_value
class ParameterEntityTest < self
def test_have_value
xml = <<EOF
<!DOCTYPE root [
<!ENTITY % a "BOOM.BOOM.BOOM.BOOM.BOOM.BOOM.BOOM.BOOM.BOOM.">
@ -150,7 +153,7 @@ EOF
end
end
def test_parameter_entity_empty_value
def test_empty_value
xml = <<EOF
<!DOCTYPE root [
<!ENTITY % a "">
@ -175,6 +178,7 @@ EOF
end
end
end
end
def test_tag_in_cdata_with_not_ascii_only_but_ascii8bit_encoding_source
tag = "<b>...</b>"