aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/test/export_import_interactions_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/outputs/test/export_import_interactions_spec.lua')
-rw-r--r--spec/outputs/test/export_import_interactions_spec.lua35
1 files changed, 35 insertions, 0 deletions
diff --git a/spec/outputs/test/export_import_interactions_spec.lua b/spec/outputs/test/export_import_interactions_spec.lua
new file mode 100644
index 0000000..774d57a
--- /dev/null
+++ b/spec/outputs/test/export_import_interactions_spec.lua
@@ -0,0 +1,35 @@
1return describe("export import interactions", function()
2 return it("should import with alias and destructuring", function()
3 local source = {
4 origin = {
5 x = 10,
6 y = 20
7 },
8 target = "result",
9 point = {
10 x = 5,
11 y = 15
12 }
13 }
14 local x, y
15 do
16 local _obj_0 = source.origin
17 x, y = _obj_0.x, _obj_0.y
18 end
19 local target = source.target
20 local px, py
21 do
22 local x, y
23 do
24 local _obj_0 = source.point
25 x, y = _obj_0.x, _obj_0.y
26 end
27 px, py = x, y
28 end
29 assert.same(x, 10)
30 assert.same(y, 20)
31 assert.same(target, "result")
32 assert.same(px, 5)
33 return assert.same(py, 15)
34 end)
35end)