diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-02 04:46:41 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-02 04:46:41 +0000 |
commit | 46e848a65a866663161edecc81d1b46aa3e36de3 (patch) | |
tree | 39edd93b75f3af6a3c8c5e59bbbd09794105a916 /test | |
parent | 12b1e59f2eacd346da550bbc30cc3644909cb314 (diff) | |
download | ruby-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.rb | 4 |
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)) |