Commit a233fcd8 authored by Attila Lendvai's avatar Attila Lendvai
Browse files

more tests for the :previous bug

Ignore-this: 47c28331db5d7aa76625078f3ff5f9bb

darcs-hash:8e3164ce4db2468289cd426aa8a791d809df62ea
parent 7f7de694
...@@ -1777,17 +1777,28 @@ ...@@ -1777,17 +1777,28 @@
;; and it returns 'EVEN instead of NIL. ;; and it returns 'EVEN instead of NIL.
nil) nil)
(deftest bug/previously-initially (deftest bug/previously-initially.1
(values (values
(ignore-errors (ignore-errors
;; it used to silently return (0 0) ;; It used to silently ignore the entire :previous expression
;; now it signals a compile-time error ;; and return (0 0). Now it signals a compile-time error.
(iter (repeat 2) (iter (repeat 2)
(for x previous y initially 0) (for x :previous (zork foo) :initially 0)
(collect x)) (collect x))
'it-should-have-errored)) 'it-should-have-errored))
nil) nil)
(deftest bug/previously-initially.2
(let ((first-arg 1)
(more-args '(2 3 4)))
(iter outer
(for rest-args :on more-args)
(for tmp = (car rest-args))
(for first :previous tmp :initially first-arg)
(iter (for second :in rest-args)
(in outer (collect (list first second))))))
((1 2) (1 3) (1 4) (2 3) (2 4) (3 4)))
(deftest bug/macrolet.2 (deftest bug/macrolet.2
(progn (progn
(format *error-output* (format *error-output*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment