diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-14 14:08:36 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-14 14:08:36 +0000 |
| commit | 59864bb38c0405a80b4767f1abed31c3ea082c19 (patch) | |
| tree | 41867cc11c9a1ef53d2dad076eb0661178b11e06 /test/ruby | |
| parent | 21abf0ea3bf0fe26ddc9588f85807e5bda92e4fa (diff) | |
| download | ruby-59864bb38c0405a80b4767f1abed31c3ea082c19.tar.gz ruby-59864bb38c0405a80b4767f1abed31c3ea082c19.tar.xz ruby-59864bb38c0405a80b4767f1abed31c3ea082c19.zip | |
add test for %B.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_sprintf_comb.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/ruby/test_sprintf_comb.rb b/test/ruby/test_sprintf_comb.rb index 8b2c1a7e0..5dee7305f 100644 --- a/test/ruby/test_sprintf_comb.rb +++ b/test/ruby/test_sprintf_comb.rb @@ -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"], ['', ' '], |
