Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test for positive "by", see issue 300 #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion ansi-tests/loop1.lsp
Original file line number Diff line number Diff line change
Expand Up @@ -358,4 +358,17 @@
(loop for i from 1 below (expand-in-current-env (%m 5)) collect i))
(1 2 3 4))


;;; http://www.lispworks.com/documentation/lw51/CLHS/Body/06_abaa.htm
;;; by The loop keyword by marks the increment or decrement supplied by form3.
;;; The value of form3 can be any positive number. The default value is 1.
(deftest loop.1.66
(signals-error
(loop for i below 10 for j by 0 collect (list i j))
program-error)
t)

(deftest loop.1.67
(signals-error
(loop for i below 10 for j by -1 collect (list i j))
program-error)
t)