mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add test for %B.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
80cdf946f7
commit
4dbc8e2454
1 changed files with 6 additions and 1 deletions
|
@ -131,6 +131,11 @@ class TestSprintfComb < Test::Unit::TestCase
|
|||
zr = nil if mi && zr
|
||||
|
||||
case type
|
||||
when 'B'
|
||||
radix = 2
|
||||
digitmap = {0 => '0', 1 => '1'}
|
||||
complement = !pl && !sp
|
||||
prefix = '0B' if hs && v != 0
|
||||
when 'b'
|
||||
radix = 2
|
||||
digitmap = {0 => '0', 1 => '1'}
|
||||
|
@ -265,7 +270,7 @@ class TestSprintfComb < Test::Unit::TestCase
|
|||
|
||||
def test_format_integer
|
||||
combination(
|
||||
%w[b d o X x],
|
||||
%w[B b d o X x],
|
||||
[nil, 0, 5, 20],
|
||||
["", ".", ".0", ".8", ".20"],
|
||||
['', ' '],
|
||||
|
|
Loading…
Reference in a new issue