summaryrefslogtreecommitdiff
path: root/test/asset/list/concat.et
diff options
context:
space:
mode:
Diffstat (limited to 'test/asset/list/concat.et')
-rw-r--r--test/asset/list/concat.et38
1 files changed, 38 insertions, 0 deletions
diff --git a/test/asset/list/concat.et b/test/asset/list/concat.et
new file mode 100644
index 0000000..c669a78
--- /dev/null
+++ b/test/asset/list/concat.et
@@ -0,0 +1,38 @@
+test Test:
+ let list1 = [ 1 ]
+ let list2 = [ 2, 3 ]
+ let empty = [ ]
+
+ node n
+
+ let c1 = concat [[ 1 ]]
+ for i in c1:
+ shell on n:
+ echo "c1 $i"
+ local:
+ shell on n:
+ echo "c1-end"
+
+ let c2 = concat [[ 1 ], [], empty]
+ for i in c2:
+ shell on n:
+ echo "c2 $i"
+ local:
+ shell on n:
+ echo "c2-end"
+
+ let c3 = concat [ list1, list2, [ 6, 5 ], list2 ]
+ for i in c3:
+ shell on n:
+ echo "c3 $i"
+ 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"