1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

adding an array splat test.

This commit is contained in:
Jeremy Ashkenas 2011-02-17 21:56:28 -05:00
parent abfc99308d
commit 86b47a528a

View file

@ -35,3 +35,14 @@ test "array splat expansions with assignments", ->
eq 0, a eq 0, a
eq 4, b eq 4, b
arrayEq [0,1,2,3,4], list 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