summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/rexml/test_notationdecl_parsetest.rb23
1 files changed, 16 insertions, 7 deletions
diff --git a/test/rexml/test_notationdecl_parsetest.rb b/test/rexml/test_notationdecl_parsetest.rb
index 2f0836c8170..27433c86260 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