summaryrefslogtreecommitdiff
path: root/test/-ext-/test_printf.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-14 02:35:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-14 02:35:51 +0000
commitc05fa459bb9f77c4fecdd230e8d1379cc997975e (patch)
tree6150004feae5cbc52d874119c7b61362b490100b /test/-ext-/test_printf.rb
parent251c7892c15082078b8db3607155b262ad8ea490 (diff)
quote symbols
* sprintf.c (ruby__sfvextra): quote symbols as identifiers. * string.c (rb_id_quote_unprintable): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-/test_printf.rb')
-rw-r--r--test/-ext-/test_printf.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/-ext-/test_printf.rb b/test/-ext-/test_printf.rb
index cd3ba76..feaeadd 100644
--- a/test/-ext-/test_printf.rb
+++ b/test/-ext-/test_printf.rb
@@ -24,6 +24,8 @@ class Test_SPrintf < Test::Unit::TestCase
assert_equal('["\n"]', Bug::Printf.q("\n"))
assert_equal('[aaa]', Bug::Printf.q('aaa'))
assert_equal('[a a]', Bug::Printf.q('a a'))
+ assert_equal('[]', Bug::Printf.q(''))
+ assert_equal('[""]', Bug::Printf.q(:''))
end
def test_encoding