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

ruby-changes:30229

From: kou <ko1@a...>
Date: Wed, 31 Jul 2013 21:59:40 +0900 (JST)
Subject: [ruby-changes:30229] kou:r42281 (trunk): * test/rexml/test_notationdecl_parsetest.rb: Split test patterns.

kou	2013-07-31 21:59:28 +0900 (Wed, 31 Jul 2013)

  New Revision: 42281

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

  Log:
    * test/rexml/test_notationdecl_parsetest.rb: Split test patterns.

  Modified files:
    trunk/ChangeLog
    trunk/test/rexml/test_notationdecl_parsetest.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42280)
+++ ChangeLog	(revision 42281)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Jul 31 21:58:53 2013  Kouhei Sutou  <kou@c...>
+
+	* test/rexml/test_notationdecl_parsetest.rb: Split test patterns.
+
 Wed Jul 31 21:42:33 2013  Kouhei Sutou  <kou@c...>
 
 	* test/rexml/test_notationdecl_parsetest.rb: Group tests.
Index: test/rexml/test_notationdecl_parsetest.rb
===================================================================
--- test/rexml/test_notationdecl_parsetest.rb	(revision 42280)
+++ test/rexml/test_notationdecl_parsetest.rb	(revision 42281)
@@ -24,13 +24,22 @@ class TestNotationDecl < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/test/rexml/test_notationdecl_parsetest.rb#L24
   end
 
   class TestExternID < self
-    def test_notation
-      doctype = parse(<<-INTERNAL_SUBSET)
-        <!NOTATION n1 PUBLIC "-//HM//NOTATION TEST1//EN" 'urn:x-henrikmartensson.org:test5'>
-        <!NOTATION n2 PUBLIC '-//HM//NOTATION TEST2//EN' "urn:x-henrikmartensson.org:test6">
-      INTERNAL_SUBSET
-      assert(doctype.notation('n1'), "Testing notation n1")
-      assert(doctype.notation('n2'), "Testing notation n2")
+    class TestPublic < self
+      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

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

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