]> git.eshelyaron.com Git - emacs.git/commitdiff
Print newlines as \n instead of \12 in ERT results
authorMattias Engdegård <mattiase@acm.org>
Fri, 25 Jun 2021 17:43:04 +0000 (19:43 +0200)
committerMattias Engdegård <mattiase@acm.org>
Fri, 25 Jun 2021 17:55:27 +0000 (19:55 +0200)
This makes test errors unquestionably more readable.  The change also
makes FF print as \f; other controls still use octal escapes.

* lisp/emacs-lisp/ert.el (ert--pp-with-indentation-and-newline):
Run `pp` with `pp-escape-newlines` set to `t`.

lisp/emacs-lisp/ert.el

index 7de07bd6f53b336551112d6fdde009c2b62df10f..50b45092ca85f36e2b73af9d96c8c2002bfb6961 100644 (file)
@@ -1301,7 +1301,7 @@ empty string."
   "Pretty-print OBJECT, indenting it to the current column of point.
 Ensures a final newline is inserted."
   (let ((begin (point))
-        (pp-escape-newlines nil)
+        (pp-escape-newlines t)
         (print-escape-control-characters t))
     (pp object (current-buffer))
     (unless (bolp) (insert "\n"))