From 8c3d786157ec7fef3072feac55c2d5450800568b Mon Sep 17 00:00:00 2001 From: Li Jin Date: Fri, 30 Jan 2026 18:16:45 +0800 Subject: Added more tests. --- .../test/export_import_interactions_spec.lua | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 spec/outputs/test/export_import_interactions_spec.lua (limited to 'spec/outputs/test/export_import_interactions_spec.lua') 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 @@ +return describe("export import interactions", function() + return it("should import with alias and destructuring", function() + local source = { + origin = { + x = 10, + y = 20 + }, + target = "result", + point = { + x = 5, + y = 15 + } + } + local x, y + do + local _obj_0 = source.origin + x, y = _obj_0.x, _obj_0.y + end + local target = source.target + local px, py + do + local x, y + do + local _obj_0 = source.point + x, y = _obj_0.x, _obj_0.y + end + px, py = x, y + end + assert.same(x, 10) + assert.same(y, 20) + assert.same(target, "result") + assert.same(px, 5) + return assert.same(py, 15) + end) +end) -- cgit v1.2.3-55-g6feb