summaryrefslogtreecommitdiff
path: root/test/-ext-/test_printf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/-ext-/test_printf.rb')
-rw-r--r--test/-ext-/test_printf.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/-ext-/test_printf.rb b/test/-ext-/test_printf.rb
index 29f384b1d7..4532c371b4 100644
--- a/test/-ext-/test_printf.rb
+++ b/test/-ext-/test_printf.rb
@@ -22,6 +22,12 @@ class Test_SPrintf < Test::Unit::TestCase
assert_equal("{<#{self.class}:#{object_id}>}", Bug::Printf.v(self))
end
+ def test_quote
+ assert_equal('["\n"]', Bug::Printf.q("\n"))
+ assert_equal('[aaa]', Bug::Printf.q('aaa'))
+ assert_equal('[a a]', Bug::Printf.q('a a'))
+ end
+
def test_encoding
def self.to_s
"\u{3042 3044 3046 3048 304a}"