aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-02 04:46:41 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-02 04:46:41 +0000
commit46e848a65a866663161edecc81d1b46aa3e36de3 (patch)
tree39edd93b75f3af6a3c8c5e59bbbd09794105a916 /test
parent12b1e59f2eacd346da550bbc30cc3644909cb314 (diff)
downloadruby-46e848a65a866663161edecc81d1b46aa3e36de3.tar.gz
* sprintf.c (rb_f_sprintf): should not check positional number as
width. [ruby-core:11838] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_sprintf.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_sprintf.rb b/test/ruby/test_sprintf.rb
index 5e0b763e99..018486baae 100644
--- a/test/ruby/test_sprintf.rb
+++ b/test/ruby/test_sprintf.rb
@@ -1,6 +1,10 @@
require 'test/unit'
class TestSprintf < Test::Unit::TestCase
+ def test_positional
+ assert_equal(" 00001", sprintf("%*1$.*2$3$d", 10, 5, 1))
+ end
+
def test_binary
assert_equal("0", sprintf("%b", 0))
assert_equal("1", sprintf("%b", 1))