ERT: escape control characters in pretty-printed error output

* lisp/emacs-lisp/ert.el (ert--pp-with-indentation-and-newline):
Escape control characters which would otherwise be blasted directly to
the terminal (when running noninteractively) with unpleasant results.
This commit is contained in:
Mattias Engdegård 2020-10-27 13:20:20 +01:00
parent cde72637df
commit 88f5530a9b

View file

@ -1305,7 +1305,8 @@ EXPECTEDP specifies whether the result was expected."
"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 nil)
(print-escape-control-characters t))
(pp object (current-buffer))
(unless (bolp) (insert "\n"))
(save-excursion