summaryrefslogtreecommitdiffhomepage
path: root/test/t/array.rb
diff options
context:
space:
mode:
authorMasaki Muranaka <[email protected]>2012-06-21 11:43:03 +0900
committerMasaki Muranaka <[email protected]>2012-06-21 11:43:03 +0900
commit750a639eab6e0c5615cd7651c1ab4215a8247ef7 (patch)
treea6fe5250a5807f69233d0f17ebb222e9fd4e87df /test/t/array.rb
parente61bdbe3960aa471a8b4e5d8a89614d1433959aa (diff)
downloadmruby-750a639eab6e0c5615cd7651c1ab4215a8247ef7.tar.gz
mruby-750a639eab6e0c5615cd7651c1ab4215a8247ef7.zip
Add test for Array#to_s and Array#inspect.
Diffstat (limited to 'test/t/array.rb')
-rw-r--r--test/t/array.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/t/array.rb b/test/t/array.rb
index 1cfe02af7..3f441c1cc 100644
--- a/test/t/array.rb
+++ b/test/t/array.rb
@@ -234,4 +234,12 @@ assert('Array#unshift', '15.2.12.5.30') do
a == [1,2,3] and b == [1,2,3]
end
+assert('Array#to_s', '15.2.12.5.31') do
+ a = [2, 3, 4, 5]
+ r1 = a.to_s
+ r2 = a.inspect
+
+ r1 == r2 and r1 == "[2, 3, 4, 5]"
+end
+
# Not ISO specified