diff options
Diffstat (limited to 'test/rexml')
-rw-r--r-- | test/rexml/test_entity.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/rexml/test_entity.rb b/test/rexml/test_entity.rb index 5900fac7a8..7b9f39495f 100644 --- a/test/rexml/test_entity.rb +++ b/test/rexml/test_entity.rb @@ -164,4 +164,24 @@ class EntityTester < Test::Unit::TestCase def test_single_pass_unnormalization # ticket 123 assert_equal '&&', REXML::Text::unnormalize('&amp;&') end + + def test_entity_filter + document = REXML::Document.new(<<-XML) +<!DOCTYPE root [ +<!ENTITY copy "(c)"> +<!ENTITY release-year "2013"> +]> +<root/> +XML + respect_whitespace = false + parent = document.root + raw = false + entity_filter = ["copy"] + assert_equal("(c) &release-year;", + REXML::Text.new("(c) 2013", + respect_whitespace, + parent, + raw, + entity_filter).to_s) + end end |