summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-31 12:44:24 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-31 12:44:24 +0000
commit3e04769926f302577c10310ec629b2f5c4a84d8d (patch)
tree9036128cb6c68d495091f2b7323e07b5c407803f
parent1251f51ee7ca784d923ad1400778885631063292 (diff)
* test/rexml/test_notationdecl_parsetest.rb: Group tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--test/rexml/test_notationdecl_parsetest.rb32
2 files changed, 22 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index f344dd172c..4254a6d060 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Jul 31 21:42:33 2013 Kouhei Sutou <kou@cozmixng.org>
+
+ * test/rexml/test_notationdecl_parsetest.rb: Group tests.
+
Wed Jul 31 21:37:51 2013 Kouhei Sutou <kou@cozmixng.org>
* test/rexml/test_notationdecl_mixin.rb (TestNotationDecl#test_name):
diff --git a/test/rexml/test_notationdecl_parsetest.rb b/test/rexml/test_notationdecl_parsetest.rb
index 78787a41ab..2f0836c817 100644
--- a/test/rexml/test_notationdecl_parsetest.rb
+++ b/test/rexml/test_notationdecl_parsetest.rb
@@ -2,20 +2,6 @@ require 'test/unit'
require 'rexml/document'
class TestNotationDecl < Test::Unit::TestCase
- def test_name
- doctype = parse("<!NOTATION name PUBLIC 'urn:public-id'>")
- assert_equal("name", doctype.notation("name").name)
- end
-
- 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")
- end
-
private
def xml(internal_subset)
<<-XML
@@ -29,4 +15,22 @@ class TestNotationDecl < Test::Unit::TestCase
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 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")
+ end
+ end
end