diff options
Diffstat (limited to 'test/rexml/parser')
-rw-r--r-- | test/rexml/parser/test_sax2.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/rexml/parser/test_sax2.rb b/test/rexml/parser/test_sax2.rb index f1e64121af..a4279fa5d3 100644 --- a/test/rexml/parser/test_sax2.rb +++ b/test/rexml/parser/test_sax2.rb @@ -54,6 +54,18 @@ class TestSAX2Parser < Test::Unit::TestCase class TestExternlID < self class TestSystem < self + def test_with_ndata + declaration = [ + "name", + "SYSTEM", "system-literal", + "NDATA", "ndata-name", + ] + assert_equal([declaration], + parse(<<-INTERNAL_SUBSET)) +<!ENTITY name SYSTEM "system-literal" NDATA ndata-name> + INTERNAL_SUBSET + end + def test_without_ndata declaration = [ "name", @@ -67,6 +79,18 @@ class TestSAX2Parser < Test::Unit::TestCase end class TestPublic < self + def test_with_ndata + declaration = [ + "name", + "PUBLIC", "public-literal", "system-literal", + "NDATA", "ndata-name", + ] + assert_equal([declaration], + parse(<<-INTERNAL_SUBSET)) +<!ENTITY name PUBLIC "public-literal" "system-literal" NDATA ndata-name> + INTERNAL_SUBSET + end + def test_without_ndata declaration = [ "name", |