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 5732cecbf9..440cd1d6ab 100644
--- a/test/ruby/test_sprintf.rb
+++ b/test/ruby/test_sprintf.rb
@@ -282,6 +282,10 @@ class TestSprintf < Test::Unit::TestCase
assert_equal(" 0x1.000p+0", sprintf("%20.3a", 1), bug3979)
end
+ def test_float_prec
+ assert_equal("5.03", sprintf("%.2f",5.025))
+ end
+
BSIZ = 120
def test_skip