aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_sprintf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_sprintf.rb')
-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))