summary refs log tree commit diff
path: root/tests/test.mew
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test.mew')
-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))))