add minimal tests for xml_escape filter

This commit is contained in:
Aristotle Pagaltzis 2009-01-20 10:21:22 +01:00
parent f7a40f4d6d
commit ea70d8ac7a
1 changed files with 6 additions and 1 deletions

View File

@ -29,4 +29,9 @@ class TestFilters < Test::Unit::TestCase
assert_equal "chunky, bacon, bits, and pieces", @filter.array_to_sentence_string(["chunky", "bacon", "bits", "pieces"])
end
end
def test_xml_escape_with_ampersands
assert_equal "AT&amp;T", @filter.xml_escape("AT&T")
assert_equal "&lt;code&gt;command &amp;lt;filename&amp;gt;&lt;/code&gt;", @filter.xml_escape("<code>command &lt;filename&gt;</code>")
end
end