diff options
author | Ludovic Courtès <ludovic.courtes@inria.fr> | 2023-04-24 10:10:00 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-04-24 10:27:13 +0200 |
commit | 7931ac810b8feaadcbbfa3a31786087da2d5ee73 (patch) | |
tree | b9a45254cf47354eb8e48a43e26ba042ff645cb3 /tests | |
parent | 74e96c4cb171b17949f638d8b452d047a8f2dc6f (diff) | |
download | guix-7931ac810b8feaadcbbfa3a31786087da2d5ee73.tar.gz |
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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/read-print.scm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/read-print.scm b/tests/read-print.scm index f4627e076a..c2b236b172 100644 --- a/tests/read-print.scm +++ b/tests/read-print.scm @@ -195,6 +195,11 @@ expressions." (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.\")" #:max-width 30) |