зеркало из https://github.com/github/ruby.git
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:
Родитель
c0f84528c7
Коммит
645a0eb8ec
|
@ -21,6 +21,19 @@ class CGICoreTest < Test::Unit::TestCase
|
|||
$stdout = STDOUT
|
||||
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
|
||||
@environ = {
|
||||
|
|
Загрузка…
Ссылка в новой задаче