s-expressionists / Eclector

A portable Common Lisp reader that is highly customizable, can recover from errors and can return concrete syntax trees
https://s-expressionists.github.io/Eclector/
BSD 2-Clause "Simplified" License
109 stars 9 forks source link

Tests that print circular structures need to bind *print-circle* nto T #77

Closed Yehouda closed 1 year ago

Yehouda commented 1 year ago

The tests labeled-objects/random and wrapper-labeled-object-csts/random call gen-labels-and-references, and then call prin1-to-string on the result. The result of gen-labels-and-references is circular, so prin1-to-string loops "forever" (gets stack overflow error on LispWorks), unless print-circle is non-nil. Since print-circle defaults to nil, these tests need to bind it to T.

https://github.com/s-expressionists/Eclector/blob/32b74ad959bd5b2773f27ecc6e62c2b167bf6626/test/concrete-syntax-tree/client.lisp#L45 https://github.com/s-expressionists/Eclector/blob/32b74ad959bd5b2773f27ecc6e62c2b167bf6626/test/concrete-syntax-tree/labeled-objects.lisp#L11 https://github.com/s-expressionists/Eclector/blob/32b74ad959bd5b2773f27ecc6e62c2b167bf6626/test/reader/labeled-objects.lisp#L165