summaryrefslogtreecommitdiff
path: root/test/cgi
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-21 21:46:04 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-21 21:46:04 +0000
commit993fd53616d66e09a1019dda307fbc9e28dd8890 (patch)
tree1f4121df9cdf9cf307bd97047e54f3062af7a313 /test/cgi
parentcc4271c955606522e129b409cc34e706430d4486 (diff)
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/cgi')
-rw-r--r--test/cgi/test_cgi_util.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/cgi/test_cgi_util.rb b/test/cgi/test_cgi_util.rb
index de5cfe1..c0cd4c7 100644
--- a/test/cgi/test_cgi_util.rb
+++ b/test/cgi/test_cgi_util.rb
@@ -26,14 +26,14 @@ class CGIUtilTest < Test::Unit::TestCase
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