зеркало из https://github.com/github/ruby.git
test_cgi_util.rb: fix arguments orders
* test/cgi/test_cgi_util.rb: fix arguments orders, expected values should be placed first and then actual results. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
840e32c452
Коммит
28dc41090a
|
@ -59,15 +59,15 @@ class CGIUtilTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_cgi_escapeHTML
|
||||
assert_equal(CGI::escapeHTML("'&\"><"),"'&"><")
|
||||
assert_equal("'&"><", CGI::escapeHTML("'&\"><"))
|
||||
end
|
||||
|
||||
def test_cgi_unescapeHTML
|
||||
assert_equal(CGI::unescapeHTML("'&"><"),"'&\"><")
|
||||
assert_equal("'&\"><", CGI::unescapeHTML("'&"><"))
|
||||
end
|
||||
|
||||
def test_cgi_unescapeHTML_uppercasecharacter
|
||||
assert_equal(CGI::unescapeHTML("あいう"),"\xE3\x81\x82\xE3\x81\x84\xE3\x81\x86")
|
||||
assert_equal("\xE3\x81\x82\xE3\x81\x84\xE3\x81\x86", CGI::unescapeHTML("あいう"))
|
||||
end
|
||||
|
||||
def test_cgi_include_escape
|
||||
|
@ -75,11 +75,11 @@ class CGIUtilTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_cgi_include_escapeHTML
|
||||
assert_equal(escapeHTML("'&\"><"),"'&"><")
|
||||
assert_equal("'&"><", escapeHTML("'&\"><"))
|
||||
end
|
||||
|
||||
def test_cgi_include_h
|
||||
assert_equal(h("'&\"><"),"'&"><")
|
||||
assert_equal("'&"><", h("'&\"><"))
|
||||
end
|
||||
|
||||
def test_cgi_include_unescape
|
||||
|
@ -89,7 +89,7 @@ class CGIUtilTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_cgi_include_unescapeHTML
|
||||
assert_equal(unescapeHTML("'&"><"),"'&\"><")
|
||||
assert_equal("'&\"><", unescapeHTML("'&"><"))
|
||||
end
|
||||
|
||||
def test_cgi_escapeElement
|
||||
|
|
Загрузка…
Ссылка в новой задаче