summaryrefslogtreecommitdiff
path: root/test/cgi/test_cgi_util.rb
diff options
context:
space:
mode:
authorxibbar <xibbar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-30 07:39:09 +0000
committerxibbar <xibbar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-30 07:39:09 +0000
commit8bc2fb5ba4c20437a6f4929163769fdc37a89e8b (patch)
tree9530e5fa1d981241c5d49936543274de0d663eaa /test/cgi/test_cgi_util.rb
parent08fa9bad5bc00a8315900c7eed180a3925d8a75b (diff)
add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/cgi/test_cgi_util.rb')
-rw-r--r--test/cgi/test_cgi_util.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/cgi/test_cgi_util.rb b/test/cgi/test_cgi_util.rb
index ec0744d..3a891d6 100644
--- a/test/cgi/test_cgi_util.rb
+++ b/test/cgi/test_cgi_util.rb
@@ -29,4 +29,9 @@ class CGIUtilTest < Test::Unit::TestCase
assert_equal(@str1.encoding, CGI::unescape('%26%3C%3E%22+%E3%82%86%E3%82%93%E3%82%86%E3%82%93').encoding) if RUBY_VERSION>="1.9"
end
+ def test_cgi_pretty
+ assert_equal("<HTML>\n <BODY>\n </BODY>\n</HTML>\n",CGI::pretty("<HTML><BODY></BODY></HTML>"))
+ assert_equal("<HTML>\n\t<BODY>\n\t</BODY>\n</HTML>\n",CGI::pretty("<HTML><BODY></BODY></HTML>","\t"))
+ end
+
end