summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-12-16 00:18:05 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-12-16 00:18:05 +0100
commit28ad4b62515325463656627fa3d80a984f8c0fdb (patch)
treed74de06cc1f46c599387d247744779c4934c72d3 /tests
parent234dbc781c328db11c3cc17a74d2c9301e5d82bf (diff)
downloadmew-28ad4b62515325463656627fa3d80a984f8c0fdb.tar.gz
mew-28ad4b62515325463656627fa3d80a984f8c0fdb.tar.xz
mew-28ad4b62515325463656627fa3d80a984f8c0fdb.zip
add parallel for
Diffstat (limited to 'tests')
-rw-r--r--tests/test.mew10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test.mew b/tests/test.mew
index d72b881..3aa70bb 100644
--- a/tests/test.mew
+++ b/tests/test.mew
@@ -376,7 +376,6 @@
   (test 3 (len (generator 5 6 7)))
   (test-error (len #t)))
 
-; for
 (test-group "dup"
   (let* ((x (list (list "foo") "bar"))
          (y1 (dup x))
@@ -387,6 +386,15 @@
     (test #f (eq? (car x) (car y3)))
     (test #t (eq? (caar x) (caar y3)))))
 
+(test-group "for"
+  (test 3 (accumulate (c (count-accumulator))
+            (for (x (vector 3 4 5))
+              (c x))))
+  (test 2 (accumulate (c (count-accumulator))
+            (for (x (vector 3 4 5)
+                  y (vector 6 7))
+              (c x)))))
+
 
 (test-group "eof"
   (test-assert (eof-object? (eof))))