diff options
Diffstat (limited to 'mrbgems/mruby-array-ext/test/array.rb')
| -rw-r--r-- | mrbgems/mruby-array-ext/test/array.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mrbgems/mruby-array-ext/test/array.rb b/mrbgems/mruby-array-ext/test/array.rb index 1c441cec4..8a6f50fe4 100644 --- a/mrbgems/mruby-array-ext/test/array.rb +++ b/mrbgems/mruby-array-ext/test/array.rb @@ -107,3 +107,10 @@ assert("Array#compact!") do a.compact! a == [1, "2", :t, false] end + +assert("Array#[]") do + a = [ "a", "b", "c", "d", "e" ] + a[1.1] == "b" and + a[1,2] == ["b", "c"] and + a[1..-2] == ["b", "c", "d"] +end |
