1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

add a test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
xibbar 2008-09-28 14:55:59 +00:00
parent c0f84528c7
commit 645a0eb8ec

View file

@ -21,6 +21,19 @@ class CGICoreTest < Test::Unit::TestCase
$stdout = STDOUT $stdout = STDOUT
end end
def test_cgi_parse_illegal_query
@environ = {
'REQUEST_METHOD' => 'GET',
'QUERY_STRING' => 'a=111&&b=222&c&d=',
'HTTP_COOKIE' => '_session_id=12345; name1=val1&val2;',
'SERVER_SOFTWARE' => 'Apache 2.2.0',
'SERVER_PROTOCOL' => 'HTTP/1.1',
}
ENV.update(@environ)
cgi = CGI.new
assert_equal(["a","b","d"],cgi.keys.sort) if RUBY_VERSION>="1.9"
assert_equal("",cgi["d"])
end
def test_cgi_core_params_GET def test_cgi_core_params_GET
@environ = { @environ = {