mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_cgi_util.rb: test_cgi_unescapeHTML_invalid
* test/cgi/test_cgi_util.rb (test_cgi_unescapeHTML_invalid): test for invalid escaped HTML, borrowed from rubyspec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
65c9555d88
commit
8a180ee4b7
1 changed files with 4 additions and 0 deletions
|
@ -98,6 +98,10 @@ class CGIUtilTest < Test::Unit::TestCase
|
|||
assert_equal("'&\"><", CGI::unescapeHTML("'&"><"))
|
||||
end
|
||||
|
||||
def test_cgi_unescapeHTML_invalid
|
||||
assert_equal('&<&>"&abcdefghijklmn', CGI::unescapeHTML('&<&>"&abcdefghijklmn'))
|
||||
end
|
||||
|
||||
Encoding.list.each do |enc|
|
||||
begin
|
||||
escaped = "'&"><".encode(enc)
|
||||
|
|
Loading…
Add table
Reference in a new issue