summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2026-05-18 20:34:43 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2026-05-18 20:34:43 +0200
commita40b7da1ab4028bba53f9768b7a58a7c619a052d (patch)
treeae81e2bb556957ec5891f2c0d3ead8d60147af3f /test
parent9e1d65b41b0f5435859794682880c93767d1dc44 (diff)
Concatenation operator for listsHEADmaster
Changelog: Added `++` operator to concatenate lists
Diffstat (limited to 'test')
-rw-r--r--test/asset/list/concat.et8
-rw-r--r--test/script/list.et8
2 files changed, 16 insertions, 0 deletions
diff --git a/test/asset/list/concat.et b/test/asset/list/concat.et
index 613df57..c669a78 100644
--- a/test/asset/list/concat.et
+++ b/test/asset/list/concat.et
@@ -28,3 +28,11 @@ test Test:
local:
shell on n:
echo "c3-end"
+
+ let c4 = list1 ++ list2 ++ [ 6, 5 ] ++ list2
+ for i in c4:
+ shell on n:
+ echo "c4 $i"
+ local:
+ shell on n:
+ echo "c4-end"
diff --git a/test/script/list.et b/test/script/list.et
index a654111..cfd4803 100644
--- a/test/script/list.et
+++ b/test/script/list.et
@@ -28,6 +28,14 @@ test ListConcat:
"c3 2"
"c3 3"
"c3-end"
+ "c4 1"
+ "c4 2"
+ "c4 3"
+ "c4 6"
+ "c4 5"
+ "c4 2"
+ "c4 3"
+ "c4-end"
local:
expect /(run-.*)/ capture done
guard (done == "run-done")