diff options
Diffstat (limited to 'test/webrick')
-rw-r--r-- | test/webrick/test_htmlutils.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/webrick/test_htmlutils.rb b/test/webrick/test_htmlutils.rb new file mode 100644 index 0000000000..987bc229c9 --- /dev/null +++ b/test/webrick/test_htmlutils.rb @@ -0,0 +1,16 @@ +require "test/unit" +require "webrick/htmlutils" + +class TestWEBrickHTMLUtils < Test::Unit::TestCase + include WEBrick::HTMLUtils + + def test_escape + assert_equal("foo", escape("foo")) + assert_equal("foo bar", escape("foo bar")) + assert_equal("foo&bar", escape("foo&bar")) + assert_equal("foo"bar", escape("foo\"bar")) + assert_equal("foo>bar", escape("foo>bar")) + assert_equal("foo<bar", escape("foo<bar")) + assert_equal("こんにちは", escape("こんにちは")) + end +end |