ruby-changes:36365
From: kou <ko1@a...>
Date: Sat, 15 Nov 2014 20:47:55 +0900 (JST)
Subject: [ruby-changes:36365] kou:r48446 (trunk): * test/rexml/test_document.rb
kou 2014-11-15 20:47:34 +0900 (Sat, 15 Nov 2014) New Revision: 48446 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48446 Log: * test/rexml/test_document.rb (REXMLTests::TestDocument::EntityExpansionLimitTest): Group tests by general entity and parameter entity. Modified files: trunk/ChangeLog trunk/test/rexml/test_document.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 48445) +++ ChangeLog (revision 48446) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Nov 15 20:46:44 2014 Kouhei Sutou <kou@c...> + + * 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@c...> * test/rexml/test_document.rb Index: test/rexml/test_document.rb =================================================================== --- test/rexml/test_document.rb (revision 48445) +++ test/rexml/test_document.rb (revision 48446) @@ -41,7 +41,8 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/rexml/test_document.rb#L41 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 https://github.com/ruby/ruby/blob/trunk/test/rexml/test_document.rb#L72 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 https://github.com/ruby/ruby/blob/trunk/test/rexml/test_document.rb#L102 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 https://github.com/ruby/ruby/blob/trunk/test/rexml/test_document.rb#L125 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 https://github.com/ruby/ruby/blob/trunk/test/rexml/test_document.rb#L153 end end - def test_parameter_entity_empty_value + def test_empty_value xml = <<EOF <!DOCTYPE root [ <!ENTITY % a ""> @@ -175,6 +178,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/rexml/test_document.rb#L178 end end end + end def test_tag_in_cdata_with_not_ascii_only_but_ascii8bit_encoding_source tag = "<b>...</b>" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/