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

* test/ruby/test_rand.rb (test_random_bytes): fold mysteriously

long line.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-06-30 11:35:04 +00:00
parent 5700a8601a
commit 00d0d6eab0

View file

@ -340,10 +340,14 @@ END
end
def test_random_bytes
r = Random.new(0)
assert_random_bytes(Random.new(0))
end
def assert_random_bytes(r)
assert_equal("", r.bytes(0))
assert_equal("\xAC".force_encoding("ASCII-8BIT"), r.bytes(1))
assert_equal("/\xAA\xC4\x97u\xA6\x16\xB7\xC0\xCC".force_encoding("ASCII-8BIT"), r.bytes(10))
assert_equal("/\xAA\xC4\x97u\xA6\x16\xB7\xC0\xCC".force_encoding("ASCII-8BIT"),
r.bytes(10))
end
def test_random_range