Print newlines as \n instead of \12 in ERT results

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`.
This commit is contained in:
Mattias Engdegård 2021-06-25 19:43:04 +02:00
parent db491e07a2
commit 52528d6a16

View 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"))