ruby-changes:18072
From: kazu <ko1@a...>
Date: Mon, 6 Dec 2010 19:01:53 +0900 (JST)
Subject: [ruby-changes:18072] Ruby:r30093 (trunk): * test/uri/test_common.rb (TestCommon#test_encode_www_form): add
kazu 2010-12-06 19:01:42 +0900 (Mon, 06 Dec 2010) New Revision: 30093 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30093 Log: * test/uri/test_common.rb (TestCommon#test_encode_www_form): add tests for r30015. Modified files: trunk/ChangeLog trunk/test/uri/test_common.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 30092) +++ ChangeLog (revision 30093) @@ -1,3 +1,8 @@ +Mon Dec 6 18:55:36 2010 Kazuhiro NISHIYAMA <zn@m...> + + * test/uri/test_common.rb (TestCommon#test_encode_www_form): add + tests for r30015. + Mon Dec 6 10:39:54 2010 NARUSE, Yui <naruse@r...> * lib/uri/common.rb (URI::Parser#initialize_pattern): Index: test/uri/test_common.rb =================================================================== --- test/uri/test_common.rb (revision 30092) +++ test/uri/test_common.rb (revision 30093) @@ -97,6 +97,11 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/