aboutsummaryrefslogtreecommitdiff
path: root/testsuite/runnable/for_with.elna
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/runnable/for_with.elna')
-rw-r--r--testsuite/runnable/for_with.elna9
1 files changed, 9 insertions, 0 deletions
diff --git a/testsuite/runnable/for_with.elna b/testsuite/runnable/for_with.elna
new file mode 100644
index 0000000..cfec5c0
--- /dev/null
+++ b/testsuite/runnable/for_with.elna
@@ -0,0 +1,9 @@
+var
+ actual: [3]Word := [3]Word{}
+
+begin
+ for element of [3]Word{ 1u, 2u, 3u } with i do
+ actual[i] := i * element^
+ end;
+ assert(actual = [3]Word{ 1u, 4u, 9u })
+end.