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:
parent
5700a8601a
commit
00d0d6eab0
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue