summaryrefslogtreecommitdiff
path: root/test/cgi/test_cgi_util.rb
diff options
context:
space:
mode:
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 ec0744ded4..3a891d6171 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