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:
parent
abfc99308d
commit
86b47a528a
1 changed files with 11 additions and 0 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue