aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/test/destructure_spec.yue
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2026-01-22 15:03:12 +0800
committerLi Jin <dragon-fly@qq.com>2026-01-22 15:03:12 +0800
commitf1454bbbd13a71da2005ff789cde2da0e9eb81f6 (patch)
tree37131187f4218dd3ebec049101c28a161e7ca289 /spec/inputs/test/destructure_spec.yue
parent604a8e5e53cdc7391a502fcabf07e8f1cc2a778c (diff)
downloadyuescript-main.tar.gz
yuescript-main.tar.bz2
yuescript-main.zip
Adding tests.HEADmain
Diffstat (limited to 'spec/inputs/test/destructure_spec.yue')
-rw-r--r--spec/inputs/test/destructure_spec.yue5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/inputs/test/destructure_spec.yue b/spec/inputs/test/destructure_spec.yue
new file mode 100644
index 0000000..802774c
--- /dev/null
+++ b/spec/inputs/test/destructure_spec.yue
@@ -0,0 +1,5 @@
1describe "destructure", ->
2 it "defaults and nested", ->
3 t = { a: 1, b: { c: 3 }, d: nil }
4 {:a, b: {:c, :d = 4}, :e = 5} = t
5 assert.same {a, c, d, e}, {1, 3, 4, 5}