mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Add Test for String#each_byte
This commit is contained in:
@@ -346,3 +346,13 @@ assert('String#bytes') do
|
||||
str1.bytes == bytes1
|
||||
end
|
||||
|
||||
assert('String#each_byte') do
|
||||
str1 = "hello"
|
||||
bytes1 = [104, 101, 108, 108, 111]
|
||||
bytes2 = []
|
||||
|
||||
str1.each_byte {|b| bytes2 << b }
|
||||
|
||||
bytes1 == bytes2
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user