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

ruby-changes:30237

From: kou <ko1@a...>
Date: Wed, 31 Jul 2013 22:59:00 +0900 (JST)
Subject: [ruby-changes:30237] kou:r42289 (trunk): * test/rexml/test_notationdecl_parsetest.rb: Rename to ...

kou	2013-07-31 22:58:49 +0900 (Wed, 31 Jul 2013)

  New Revision: 42289

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

  Log:
    * test/rexml/test_notationdecl_parsetest.rb: Rename to ...
    * test/rexml/parse/test_notation_declaration.rb: ... this.

  Added directories:
    trunk/test/rexml/parse/
  Added files:
    trunk/test/rexml/parse/test_notation_declaration.rb
  Removed files:
    trunk/test/rexml/test_notationdecl_parsetest.rb
  Modified files:
    trunk/ChangeLog

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42288)
+++ ChangeLog	(revision 42289)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Jul 31 22:57:50 2013  Kouhei Sutou  <kou@c...>
+
+	* test/rexml/test_notationdecl_parsetest.rb: Rename to ...
+	* test/rexml/parse/test_notation_declaration.rb: ... this.
+
 Wed Jul 31 22:54:39 2013  Kouhei Sutou  <kou@c...>
 
 	* test/rexml/test_notationdecl_mixin.rb: Remove duplicated tests.
Index: test/rexml/test_notationdecl_parsetest.rb
===================================================================
--- test/rexml/test_notationdecl_parsetest.rb	(revision 42288)
+++ test/rexml/test_notationdecl_parsetest.rb	(revision 42289)
@@ -1,77 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/test/rexml/test_notationdecl_parsetest.rb#L0
-require 'test/unit'
-require 'rexml/document'
-
-class TestNotationDecl < Test::Unit::TestCase
-  private
-  def xml(internal_subset)
-    <<-XML
-<!DOCTYPE r SYSTEM "urn:x-henrikmartensson:test" [
-#{internal_subset}
-]>
-<r/>
-    XML
-  end
-
-  def parse(internal_subset)
-    REXML::Document.new(xml(internal_subset)).doctype
-  end
-
-  class TestCommon < self
-    def test_name
-      doctype = parse("<!NOTATION name PUBLIC 'urn:public-id'>")
-      assert_equal("name", doctype.notation("name").name)
-    end
-  end
-
-  class TestExternalID < self
-    class TestSystem < self
-      def test_single_quote
-        doctype = parse(<<-INTERNAL_SUBSET)
-<!NOTATION name SYSTEM 'system-literal'>
-        INTERNAL_SUBSET
-        assert_equal("system-literal", doctype.notation("name").system)
-      end
-
-      def test_double_quote
-        doctype = parse(<<-INTERNAL_SUBSET)
-<!NOTATION name SYSTEM "system-literal">
-        INTERNAL_SUBSET
-        assert_equal("system-literal", doctype.notation("name").system)
-      end
-    end
-
-    class TestPublic < self
-      class TestPublicIDLiteral < self
-        def test_single_quote
-          doctype = parse(<<-INTERNAL_SUBSET)
-<!NOTATION name PUBLIC 'public-id-literal' "system-literal">
-          INTERNAL_SUBSET
-          assert_equal("public-id-literal", doctype.notation("name").public)
-        end
-
-        def test_double_quote
-          doctype = parse(<<-INTERNAL_SUBSET)
-<!NOTATION name PUBLIC "public-id-literal" "system-literal">
-          INTERNAL_SUBSET
-          assert_equal("public-id-literal", doctype.notation("name").public)
-        end
-      end
-
-      class TestSystemLiteral < self
-        def test_single_quote
-          doctype = parse(<<-INTERNAL_SUBSET)
-<!NOTATION name PUBLIC "public-id-literal" 'system-literal'>
-          INTERNAL_SUBSET
-          assert_equal("system-literal", doctype.notation("name").system)
-        end
-
-        def test_double_quote
-          doctype = parse(<<-INTERNAL_SUBSET)
-<!NOTATION name PUBLIC "public-id-literal" "system-literal">
-          INTERNAL_SUBSET
-          assert_equal("system-literal", doctype.notation("name").system)
-        end
-      end
-    end
-  end
-end
Index: test/rexml/parse/test_notation_declaration.rb
===================================================================
--- test/rexml/parse/test_notation_declaration.rb	(revision 0)
+++ test/rexml/parse/test_notation_declaration.rb	(revision 42289)
@@ -0,0 +1,77 @@ https://github.com/ruby/ruby/blob/trunk/test/rexml/parse/test_notation_declaration.rb#L1
+require 'test/unit'
+require 'rexml/document'
+
+class TestNotationDecl < Test::Unit::TestCase
+  private
+  def xml(internal_subset)
+    <<-XML
+<!DOCTYPE r SYSTEM "urn:x-henrikmartensson:test" [
+#{internal_subset}
+]>
+<r/>
+    XML
+  end
+
+  def parse(internal_subset)
+    REXML::Document.new(xml(internal_subset)).doctype
+  end
+
+  class TestCommon < self
+    def test_name
+      doctype = parse("<!NOTATION name PUBLIC 'urn:public-id'>")
+      assert_equal("name", doctype.notation("name").name)
+    end
+  end
+
+  class TestExternalID < self
+    class TestSystem < self
+      def test_single_quote
+        doctype = parse(<<-INTERNAL_SUBSET)
+<!NOTATION name SYSTEM 'system-literal'>
+        INTERNAL_SUBSET
+        assert_equal("system-literal", doctype.notation("name").system)
+      end
+
+      def test_double_quote
+        doctype = parse(<<-INTERNAL_SUBSET)
+<!NOTATION name SYSTEM "system-literal">
+        INTERNAL_SUBSET
+        assert_equal("system-literal", doctype.notation("name").system)
+      end
+    end
+
+    class TestPublic < self
+      class TestPublicIDLiteral < self
+        def test_single_quote
+          doctype = parse(<<-INTERNAL_SUBSET)
+<!NOTATION name PUBLIC 'public-id-literal' "system-literal">
+          INTERNAL_SUBSET
+          assert_equal("public-id-literal", doctype.notation("name").public)
+        end
+
+        def test_double_quote
+          doctype = parse(<<-INTERNAL_SUBSET)
+<!NOTATION name PUBLIC "public-id-literal" "system-literal">
+          INTERNAL_SUBSET
+          assert_equal("public-id-literal", doctype.notation("name").public)
+        end
+      end
+
+      class TestSystemLiteral < self
+        def test_single_quote
+          doctype = parse(<<-INTERNAL_SUBSET)
+<!NOTATION name PUBLIC "public-id-literal" 'system-literal'>
+          INTERNAL_SUBSET
+          assert_equal("system-literal", doctype.notation("name").system)
+        end
+
+        def test_double_quote
+          doctype = parse(<<-INTERNAL_SUBSET)
+<!NOTATION name PUBLIC "public-id-literal" "system-literal">
+          INTERNAL_SUBSET
+          assert_equal("system-literal", doctype.notation("name").system)
+        end
+      end
+    end
+  end
+end

Property changes on: test/rexml/parse/test_notation_declaration.rb
___________________________________________________________________
Added: svn:eol-style
   + LF


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

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