google / lisp-koans

Common Lisp Koans is a language learning exercise in the same vein as the ruby koans, python koans and others. It is a port of the prior koans with some modifications to highlight lisp-specific features. Structured as ordered groups of broken unit tests, the project guides the learner progressively through many Common Lisp language features.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iterations.lsp test-dolist hates multiple strings in let (clisp)

fixermark opened this issue · comments

The following section of the test appears to have issues in common lisp.

Compilation command:
cd ~/lisp-koans && clisp -q -norc -ansi contemplate.lsp

relevant code: lines 38-44:

(let ((sum 0))
"write your own dolist here to calculate the sum of some-primes"
"you may be interested in investigating the 'incf' function"
; (dolist ...)
(assert-equal 999607602 sum)
))

If I compile as-is, the result is:

Please meditate on the following code:
File "koans/iteration.lsp"
Koan "TEST-DOLIST"
Current koan assert status is "(ERROR)"

... this persists even when the solution is correct.

However, if I comment out the "you may be interested in..." line, the result is
Please meditate on the following code:
File "koans/iteration.lsp"
Koan "TEST-DOLIST"
Current koan assert status is "(PASS PASS FAIL)"

... and filling in a correct dolist works.

Note: it appears this issue is fixed by https://github.com/google/lisp-koans/pull/82/files, which is just waiting for a merge.

It's been merged!