mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
17 lines
510 B
Ruby
17 lines
510 B
Ruby
|
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
|