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.
Apache License 2.0
3.12k stars 561 forks source link

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

Closed fixermark closed 5 years ago

fixermark commented 5 years ago

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.

Slids commented 5 years ago

It's been merged!