From 7931ac810b8feaadcbbfa3a31786087da2d5ee73 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 24 Apr 2023 10:10:00 +0200 Subject: read-print: 'pretty-print-with-comments' keeps newlines on long strings. * guix/read-print.scm (printed-string)[preserve-newlines?]: New procedure. Use it to preserve newlines on long strings. * tests/read-print.scm: Add test. --- tests/read-print.scm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/read-print.scm b/tests/read-print.scm index f4627e076a4..c2b236b1721 100644 --- a/tests/read-print.scm +++ b/tests/read-print.scm @@ -194,6 +194,11 @@ expressions." (test-pretty-print "\ (string-append \"a\\tb\" \"\\n\")") +(test-pretty-print "\ +(display \"This is a very long string. +It contains line breaks, which are preserved, +because it's a long string.\")") + (test-pretty-print "\ (description \"abcdefghijkl mnopqrstuvwxyz.\")" -- cgit v1.3