1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

add a test for [ruby-dev:33224].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-01-24 06:59:03 +00:00
parent ffe425ecaa
commit 2a02fe7497

View file

@ -257,4 +257,12 @@ class TestSprintf < Test::Unit::TestCase
def test_rb_sprintf
assert(T012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789.new.inspect =~ /^#<TestSprintf::T012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789:0x[0-9a-f]+>$/)
end
def test_negative_hex
s1 = sprintf("%0x", -0x40000000)
s2 = sprintf("%0x", -0x40000001)
b1 = (/\.\./ =~ s1) != nil
b2 = (/\.\./ =~ s2) != nil
assert(b1 == b2, "[ruby-dev:33224]")
end
end