summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorDaniel Bovensiepen <[email protected]>2012-11-01 16:24:52 +0800
committerDaniel Bovensiepen <[email protected]>2012-11-01 16:24:52 +0800
commit8d9f5628eda4f1353c2578900b6396a7e06f281b (patch)
tree3277a66244e36ded3a10d0a70fd1241291652f63 /test
parent57910ca5353e1feba1fb069a876b84a52f33d39f (diff)
downloadmruby-8d9f5628eda4f1353c2578900b6396a7e06f281b.tar.gz
mruby-8d9f5628eda4f1353c2578900b6396a7e06f281b.zip
Add Test for String#bytes
Diffstat (limited to 'test')
-rw-r--r--test/t/string.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/t/string.rb b/test/t/string.rb
index 27af38a4c..1a917b1c4 100644
--- a/test/t/string.rb
+++ b/test/t/string.rb
@@ -339,3 +339,10 @@ assert('Check the usage of a NUL character') do
"qqq\0ppp"
end
+assert('String#bytes') do
+ str1 = "hello"
+ bytes1 = [104, 101, 108, 108, 111]
+
+ str1.bytes == bytes1
+end
+