aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/test/export_import_interactions_spec.yue
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2026-01-30 18:16:45 +0800
committerLi Jin <dragon-fly@qq.com>2026-01-30 18:16:45 +0800
commit8c3d786157ec7fef3072feac55c2d5450800568b (patch)
tree6c44a85e02abe74e6c3ccc4d7393ba8784c49ce7 /spec/inputs/test/export_import_interactions_spec.yue
parent220a10d0df3341b2bbb0beaee4f90d6480e7ae38 (diff)
downloadyuescript-main.tar.gz
yuescript-main.tar.bz2
yuescript-main.zip
Added more tests.HEADmain
Diffstat (limited to 'spec/inputs/test/export_import_interactions_spec.yue')
-rw-r--r--spec/inputs/test/export_import_interactions_spec.yue19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/inputs/test/export_import_interactions_spec.yue b/spec/inputs/test/export_import_interactions_spec.yue
new file mode 100644
index 0000000..8281246
--- /dev/null
+++ b/spec/inputs/test/export_import_interactions_spec.yue
@@ -0,0 +1,19 @@
1describe "export import interactions", ->
2 it "should import with alias and destructuring", ->
3 source = {
4 origin: {x: 10, y: 20}
5 target: "result"
6 point: {x: 5, y: 15}
7 }
8 import x, y from source.origin
9 import target from source
10 px, py = do
11 local x, y
12 import x, y from source.point
13 x, y
14
15 assert.same x, 10
16 assert.same y, 20
17 assert.same target, "result"
18 assert.same px, 5
19 assert.same py, 15