summaryrefslogtreecommitdiff
path: root/test/erb
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-14 07:28:43 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-14 07:28:43 +0000
commitf42a7c09513b5f73e21e6fae881f3bc2f760b9af (patch)
tree871f68a1eb5e21cb290165a3372d31eac3745bab /test/erb
parenta2884195e7461ce42ad19e52a1cdd55ac9e3f315 (diff)
* test/erb/test_erb.rb (test_html_escape): add assertions for the
cases where the argument is not a String. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/erb')
-rw-r--r--test/erb/test_erb.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/erb/test_erb.rb b/test/erb/test_erb.rb
index e3bc54a..fc1e1fc 100644
--- a/test/erb/test_erb.rb
+++ b/test/erb/test_erb.rb
@@ -46,6 +46,9 @@ class TestERB < Test::Unit::TestCase
assert_equal("", ERB::Util.html_escape(""))
assert_equal("abc", ERB::Util.html_escape("abc"))
assert_equal("&lt;&lt;", ERB::Util.html_escape("<<"))
+
+ assert_equal("", ERB::Util.html_escape(nil))
+ assert_equal("123", ERB::Util.html_escape(123))
end
end