From b8e6def25744601e7a873db555c0a517c7cc377c Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sun, 2 Dec 2018 02:00:17 +0000 Subject: [PATCH] pp is not busted; I just didn't know about pp-avoid-circularity. TIL. --- tests/runtime/test-pp.scm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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"))) -- 2.25.1