stricter array splat tests.

This commit is contained in:
Jeremy Ashkenas 2011-02-18 07:15:40 -05:00
parent 86b47a528a
commit faf98dacf6
1 changed files with 5 additions and 4 deletions

View File

@ -37,12 +37,13 @@ test "array splat expansions with assignments", ->
arrayEq [0,1,2,3,4], list
test "array splats with nested arrays", ->
a = [1]
nonce = {}
a = [nonce]
list = [1, 2, a...]
eq list[0], 1
eq list[2], 1
eq list[2], nonce
a = [[1]]
a = [[nonce]]
list = [1, 2, a...]
ok list[2] instanceof Array
arrayEq list, [1, 2, [nonce]]