From fb270ad51627b947e1bae2d0fef15adedaa27861 Mon Sep 17 00:00:00 2001 From: leaf corcoran Date: Fri, 21 Jun 2013 18:47:46 -0700 Subject: [PATCH] table comprehension spec --- spec/comprehension_spec.moon | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/comprehension_spec.moon b/spec/comprehension_spec.moon index 901bcaa..b7ac227 100644 --- a/spec/comprehension_spec.moon +++ b/spec/comprehension_spec.moon @@ -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