git » jacl.git » commit 05c84f8

DOLIST test

author Alan Dipert
2021-07-24 06:10:06 UTC
committer Alan Dipert
2021-07-24 06:10:06 UTC
parent 378938cea3430824c79939dbfca2c7778c898ffa

DOLIST test

jacl-tests.lisp +7 -0

diff --git a/jacl-tests.lisp b/jacl-tests.lisp
index 764cdb9..33ac26e 100644
--- a/jacl-tests.lisp
+++ b/jacl-tests.lisp
@@ -154,6 +154,13 @@
        (assert= k 0))
     (setq k (1- k))))
 
+(deftest "DOLIST"
+  (let ((x 0))
+    (assert=
+     (dolist (i '(1 2 3 4 5) x)
+       (setq x (+ x i)))
+     15)))
+
 (start-tests)
 
 ;; ;; (in-module "Control operators")