adding an array splat test.

This commit is contained in:
Jeremy Ashkenas 2011-02-17 21:56:28 -05:00
parent abfc99308d
commit 86b47a528a
1 changed files with 11 additions and 0 deletions

View File

@ -35,3 +35,14 @@ test "array splat expansions with assignments", ->
eq 0, a
eq 4, b
arrayEq [0,1,2,3,4], list
test "array splats with nested arrays", ->
a = [1]
list = [1, 2, a...]
eq list[0], 1
eq list[2], 1
a = [[1]]
list = [1, 2, a...]
ok list[2] instanceof Array