From: Taylor R Campbell Date: Sun, 2 Dec 2018 02:00:17 +0000 (+0000) Subject: pp is not busted; I just didn't know about pp-avoid-circularity. X-Git-Tag: mit-scheme-pucked-10.1.7~3^2~57 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b8e6def25744601e7a873db555c0a517c7cc377c;p=mit-scheme.git pp is not busted; I just didn't know about pp-avoid-circularity. TIL. --- diff --git a/tests/runtime/test-pp.scm b/tests/runtime/test-pp.scm index 69893f065..2174a58e1 100644 --- a/tests/runtime/test-pp.scm +++ b/tests/runtime/test-pp.scm @@ -74,9 +74,10 @@ USA. (define (doit) (let ((c (cons 0 0))) (set-cdr! c c) - (call-with-output-string (lambda (p) (pp c p))))) - (expect-failure - (lambda () - (assert-eqv - (carefully doit (lambda () 'stack-overflow) (lambda () 'timeout)) - "#0=(0 . #0#)"))))) + (call-with-output-string + (lambda (p) + (parameterize ((param:pp-avoid-circularity? #t)) + (pp c p)))))) + (assert-equal + (carefully doit (lambda () 'stack-overflow) (lambda () 'timeout)) + "(0 0 . #[circularity (current parenthetical level, downstream 1 cdr.)])\n")))