From: Mattias EngdegÄrd Date: Fri, 25 Jun 2021 17:43:04 +0000 (+0200) Subject: Print newlines as \n instead of \12 in ERT results X-Git-Tag: emacs-28.0.90~2028 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=52528d6a162630a57ec0dd182295b4ce2c4c228d;p=emacs.git 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`. --- diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 7de07bd6f53..50b45092ca8 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -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"))