aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/test/table_spreading_spec.yue
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2022-07-27 11:39:50 +0800
committerLi Jin <dragon-fly@qq.com>2022-07-27 11:39:50 +0800
commit8df3b854939a63b14aab3fd4688b0caea3daf1dc (patch)
tree5c142c53bd1f60ede9603f9ba05be731bad61b60 /spec/inputs/test/table_spreading_spec.yue
parent0f5bdeaeba0f04e49c47f4a2be55b14185a7dfdd (diff)
downloadyuescript-8df3b854939a63b14aab3fd4688b0caea3daf1dc.tar.gz
yuescript-8df3b854939a63b14aab3fd4688b0caea3daf1dc.tar.bz2
yuescript-8df3b854939a63b14aab3fd4688b0caea3daf1dc.zip
adding test cases.
Diffstat (limited to 'spec/inputs/test/table_spreading_spec.yue')
-rw-r--r--spec/inputs/test/table_spreading_spec.yue22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/inputs/test/table_spreading_spec.yue b/spec/inputs/test/table_spreading_spec.yue
new file mode 100644
index 0000000..e7942cc
--- /dev/null
+++ b/spec/inputs/test/table_spreading_spec.yue
@@ -0,0 +1,22 @@
1describe "table spreading", ->
2 it "list and dict", ->
3 template = {
4 foo: "Hello"
5 bar: "World"
6 "!"
7 }
8
9 specialized = {
10 "a", "b", "c"
11 ...template
12 bar: "Bob"
13 }
14
15 assert.same specialized, {
16 "a"
17 "b"
18 "c"
19 "!"
20 foo: "Hello"
21 bar: "Bob"
22 }