summaryrefslogtreecommitdiff
path: root/test/scanf
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-20 21:12:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-20 21:12:58 +0000
commitb9e3f3c129b39bd99b1738dbed4273985c464074 (patch)
treeb8ffc3da245503ebbaf8e999c726ecad3e6734b8 /test/scanf
parente1ebab4ed015c1c479f98595eecfc8f1bebaba6b (diff)
* lib/scanf.rb (Scanf::FormatSpecifier#initialize): %i should accept
single digit decimal. [ruby-core:18355] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/scanf')
-rw-r--r--test/scanf/test_scanf.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/scanf/test_scanf.rb b/test/scanf/test_scanf.rb
index d2e7aa9..fe4ac50 100644
--- a/test/scanf/test_scanf.rb
+++ b/test/scanf/test_scanf.rb
@@ -179,8 +179,8 @@ def tests
[ "%3d%3x", "12abc", [12, "abc".hex] ],
[ "%s%i%d", "hello +0xdef 123", [ "hello", "def".hex, 123] ],
[ "%s%i%d", "hello -0xdef 123", [ "hello", -"def".hex, 123] ],
- [ "%s%i%i%i", "hello 012 -012 100", [ "hello", 10, -10, 100 ] ],
- [ "%s%i%i%i", "hello 012 0x12 100", [ "hello", 10, 18, 100 ] ],
+ [ "%s%i%i%i%i", "hello 012 -012 100 1", [ "hello", 10, -10, 100, 1 ] ],
+ [ "%s%i%i%i%i", "hello 012 0x12 100 1", [ "hello", 10, 18, 100, 1 ] ],
[ "%s%5i%3i%4i", "hello 0x123 123 0123", [ "hello", "0x123".hex, 123,"0123".oct] ],
[ "%s%3i%4i", "hello 1230123", [ "hello", 123,"0123".oct] ],
[ "%s%3i", "hello 1230", [ "hello", 123] ],