From: Mattias EngdegÄrd Date: Tue, 27 Oct 2020 12:20:20 +0000 (+0100) Subject: ERT: escape control characters in pretty-printed error output X-Git-Tag: emacs-28.0.90~5393 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=88f5530a9b861ae3f3003171ef9efa98ab1f8222;p=emacs.git 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. --- diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index ebb27e8a62c..baa04f2c6af 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -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