mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/uri/test_common.rb (TestCommon#test_encode_www_form): add
tests for r30015. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8d7e9e5343
commit
9600d9693c
2 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Dec 6 18:55:36 2010 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
||||
|
||||
* test/uri/test_common.rb (TestCommon#test_encode_www_form): add
|
||||
tests for r30015.
|
||||
|
||||
Mon Dec 6 10:39:54 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* lib/uri/common.rb (URI::Parser#initialize_pattern):
|
||||
|
|
|
@ -97,6 +97,11 @@ class TestCommon < Test::Unit::TestCase
|
|||
assert_equal('=', URI.encode_www_form([['', '']]))
|
||||
assert_equal('a%26b=1&c=2%3B3&e=4', URI.encode_www_form([['a&b', '1'], ['c', '2;3'], ['e', '4']]))
|
||||
assert_equal('image&title&price', URI.encode_www_form([['image', nil], ['title', nil], ['price', nil]]))
|
||||
|
||||
assert_equal("q=ruby&lang=en", URI.encode_www_form([["q", "ruby"], ["lang", "en"]]))
|
||||
assert_equal("q=ruby&lang=en", URI.encode_www_form("q" => "ruby", "lang" => "en"))
|
||||
assert_equal("q=ruby&q=perl&lang=en", URI.encode_www_form("q" => ["ruby", "perl"], "lang" => "en"))
|
||||
assert_equal("q=ruby&q=perl&lang=en", URI.encode_www_form([["q", "ruby"], ["q", "perl"], ["lang", "en"]]))
|
||||
end
|
||||
|
||||
def test_decode_www_form
|
||||
|
|
Loading…
Reference in a new issue