summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-sprintf/test/sprintf.rb
diff options
context:
space:
mode:
authorksss <[email protected]>2017-05-08 23:14:08 +0900
committerksss <[email protected]>2017-05-08 23:18:14 +0900
commit30df7c87624692227a24eee7ed7c2507b249e6e5 (patch)
tree3c9d5aa2d53bfb4a8693ee6c19903df38b4ecff2 /mrbgems/mruby-sprintf/test/sprintf.rb
parentef305305b43528d94b162078c421a0590ba1c438 (diff)
downloadmruby-30df7c87624692227a24eee7ed7c2507b249e6e5.tar.gz
mruby-30df7c87624692227a24eee7ed7c2507b249e6e5.zip
Fix segmentation fault ref: #3648
Diffstat (limited to 'mrbgems/mruby-sprintf/test/sprintf.rb')
-rw-r--r--mrbgems/mruby-sprintf/test/sprintf.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/mrbgems/mruby-sprintf/test/sprintf.rb b/mrbgems/mruby-sprintf/test/sprintf.rb
index ff2c88081..2c4a7f7a9 100644
--- a/mrbgems/mruby-sprintf/test/sprintf.rb
+++ b/mrbgems/mruby-sprintf/test/sprintf.rb
@@ -87,6 +87,10 @@ assert("String#% with invalid chr") do
end
end
+assert("String#% %b") do
+ assert_equal("..10115", "%0b5" % -5)
+end
+
assert("String#% invalid format") do
assert_raise ArgumentError do
"%?" % ""