diff mbox series

[bug#56898,05/13] style: Adjust test to not emit blank lines.

Message ID 20220802214419.19013-5-ludo@gnu.org
State Accepted
Headers show
Series Put the pretty printer to good use | expand

Commit Message

Ludovic Courtès Aug. 2, 2022, 9:44 p.m. UTC
Previously this test would produce a file containing blank lines between
inputs.

* tests/style.scm ("input labels, modify-inputs and margin comment"):
Remove trailing newlines in replacement strings of 'substitute*'
expression.
---
 tests/style.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/tests/style.scm b/tests/style.scm
index 4ac5ae7c09..6aab2c3785 100644
--- a/tests/style.scm
+++ b/tests/style.scm
@@ -355,9 +355,9 @@  (define file
 
       (substitute* file
         ((",gmp\\)(.*)$" _ rest)
-         (string-append ",gmp) ;margin comment\n" rest))
+         (string-append ",gmp) ;margin comment" rest))
         ((",acl\\)(.*)$" _ rest)
-         (string-append ",acl) ;another one\n" rest)))
+         (string-append ",acl) ;another one" rest)))
 
       (system* "guix" "style" "-L" directory "-S" "inputs"
                "my-coreutils")