mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/webrick/test_htmlutils.rb: add test for WEBrick::HTMLUtils.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c54733e120
commit
a920927afd
2 changed files with 20 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Sun May 19 23:52:22 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
|
||||
|
||||
* test/webrick/test_htmlutils.rb: add test for WEBrick::HTMLUtils.
|
||||
|
||||
Sun May 19 23:12:07 2013 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
|
||||
|
||||
* encoding.c: document fix, change default script encoding.
|
||||
|
|
16
test/webrick/test_htmlutils.rb
Normal file
16
test/webrick/test_htmlutils.rb
Normal file
|
@ -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
|
Loading…
Add table
Reference in a new issue