[前][次][番号順一覧][スレッド一覧]

ruby-changes:36363

From: kou <ko1@a...>
Date: Sat, 15 Nov 2014 20:41:08 +0900 (JST)
Subject: [ruby-changes:36363] kou:r48444 (trunk): * test/rexml/test_document.rb

kou	2014-11-15 20:40:47 +0900 (Sat, 15 Nov 2014)

  New Revision: 48444

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48444

  Log:
    * test/rexml/test_document.rb
      (REXMLTests::TestDocument::EntityExpansionLimitTest):
      Use one test method for one test.

  Modified files:
    trunk/ChangeLog
    trunk/test/rexml/test_document.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48443)
+++ ChangeLog	(revision 48444)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Nov 15 20:39:06 2014  Kouhei Sutou  <kou@c...>
+
+	* 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@c...>
 
 	* test/rexml/test_document.rb
Index: test/rexml/test_document.rb
===================================================================
--- test/rexml/test_document.rb	(revision 48443)
+++ test/rexml/test_document.rb	(revision 48444)
@@ -114,7 +114,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/rexml/test_document.rb#L114
 </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 https://github.com/ruby/ruby/blob/trunk/test/rexml/test_document.rb#L126
           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 https://github.com/ruby/ruby/blob/trunk/test/rexml/test_document.rb#L140
           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 https://github.com/ruby/ruby/blob/trunk/test/rexml/test_document.rb#L153
         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 https://github.com/ruby/ruby/blob/trunk/test/rexml/test_document.rb#L162
         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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]