]> git.eshelyaron.com Git - emacs.git/commitdiff
ERT: escape control characters in pretty-printed error output
authorMattias Engdegård <mattiase@acm.org>
Tue, 27 Oct 2020 12:20:20 +0000 (13:20 +0100)
committerMattias Engdegård <mattiase@acm.org>
Tue, 27 Oct 2020 12:20:20 +0000 (13:20 +0100)
* 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.

lisp/emacs-lisp/ert.el

index ebb27e8a62c77854e79971644031383e38c5ebf1..baa04f2c6afc77ed3850a70734ef0beed3cd04e1 100644 (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