summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-31 12:59:28 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-31 12:59:28 +0000
commit43f944dcf19943e9ca6a44c9a021de9eb5d60be1 (patch)
tree24ae3e27fa905c7c8bee5324dbbff64eadc03455
parent3e04769926f302577c10310ec629b2f5c4a84d8d (diff)
* test/rexml/test_notationdecl_parsetest.rb: Split test patterns.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--test/rexml/test_notationdecl_parsetest.rb23
2 files changed, 20 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 4254a6d..43781c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Jul 31 21:58:53 2013 Kouhei Sutou <kou@cozmixng.org>
+
+ * test/rexml/test_notationdecl_parsetest.rb: Split test patterns.
+
Wed Jul 31 21:42:33 2013 Kouhei Sutou <kou@cozmixng.org>
* test/rexml/test_notationdecl_parsetest.rb: Group tests.
diff --git a/test/rexml/test_notationdecl_parsetest.rb b/test/rexml/test_notationdecl_parsetest.rb
index 2f0836c..27433c8 100644
--- a/test/rexml/test_notationdecl_parsetest.rb
+++ b/test/rexml/test_notationdecl_parsetest.rb
@@ -24,13 +24,22 @@ class TestNotationDecl < Test::Unit::TestCase
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