mirror of
https://github.com/leafo/moonscript.git
synced 2024-11-22 02:44:23 +00:00
table comprehension spec
This commit is contained in:
parent
f3d92e7b4c
commit
fb270ad516
@ -35,3 +35,10 @@ describe "comprehension", ->
|
||||
assert.same input, {1,2,3,4}
|
||||
assert.same output, {2,4,6,8}
|
||||
|
||||
|
||||
it "should copy table", ->
|
||||
input = { 1,2,3, hello: "world", thing: true }
|
||||
output = {k,v for k,v in pairs input }
|
||||
|
||||
assert.is_true input != output
|
||||
assert.same input, output
|
||||
|
Loading…
Reference in New Issue
Block a user