Skip to content

Commit fb270ad

Browse files
committed
table comprehension spec
1 parent f3d92e7 commit fb270ad

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

spec/comprehension_spec.moon

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,10 @@ describe "comprehension", ->
3535
assert.same input, {1,2,3,4}
3636
assert.same output, {2,4,6,8}
3737

38+
39+
it "should copy table", ->
40+
input = { 1,2,3, hello: "world", thing: true }
41+
output = {k,v for k,v in pairs input }
42+
43+
assert.is_true input != output
44+
assert.same input, output

0 commit comments

Comments
 (0)