ruby-changes:33301
From: nobu <ko1@a...>
Date: Sat, 22 Mar 2014 06:46:08 +0900 (JST)
Subject: [ruby-changes:33301] nobu:r45380 (trunk): test_cgi_util.rb: escape for ruby-mode.el
nobu 2014-03-22 06:46:04 +0900 (Sat, 22 Mar 2014) New Revision: 45380 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45380 Log: test_cgi_util.rb: escape for ruby-mode.el * test/cgi/test_cgi_util.rb (CGIUtilTest): escape '<' not ruby-mode.el to confuse with here documents. Modified files: trunk/test/cgi/test_cgi_util.rb Index: test/cgi/test_cgi_util.rb =================================================================== --- test/cgi/test_cgi_util.rb (revision 45379) +++ test/cgi/test_cgi_util.rb (revision 45380) @@ -26,14 +26,14 @@ class CGIUtilTest < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/cgi/test_cgi_util.rb#L26 def test_cgi_escape_with_invalid_byte_sequence assert_nothing_raised(ArgumentError) do - assert_equal('%C0%3C%3C', CGI::escape("\xC0<<".force_encoding("UTF-8"))) + assert_equal('%C0%3C%3C', CGI::escape("\xC0\<\<".force_encoding("UTF-8"))) end end def test_cgi_escape_preserve_encoding - assert_equal(Encoding::US_ASCII, CGI::escape("\xC0<<".force_encoding("US-ASCII")).encoding) - assert_equal(Encoding::ASCII_8BIT, CGI::escape("\xC0<<".force_encoding("ASCII-8BIT")).encoding) - assert_equal(Encoding::UTF_8, CGI::escape("\xC0<<".force_encoding("UTF-8")).encoding) + assert_equal(Encoding::US_ASCII, CGI::escape("\xC0\<\<".force_encoding("US-ASCII")).encoding) + assert_equal(Encoding::ASCII_8BIT, CGI::escape("\xC0\<\<".force_encoding("ASCII-8BIT")).encoding) + assert_equal(Encoding::UTF_8, CGI::escape("\xC0\<\<".force_encoding("UTF-8")).encoding) end def test_cgi_unescape -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/