1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 02:51:31 -08:00

pp-fill: Fix tests breakage

* lisp/emacs-lisp/pp.el (pp-to-string, pp-buffer, pp): Preserve old
behavior of (almost always) returning a trailing newline.

* test/lisp/emacs-lisp/pp-tests.el (pp-print-quote): Adjust tests, now
that `pp-to-string` always returns a trailing newline, rather than only
most of the time.

* test/lisp/emacs-lisp/backtrace-tests.el
(backtrace-tests--single-and-multi-line): Make the test less sensitive
to the choice of what is "pretty".
This commit is contained in:
Stefan Monnier 2023-06-17 18:05:33 -04:00
parent 017475a70e
commit a9c962be96
3 changed files with 18 additions and 5 deletions

View file

@ -23,8 +23,8 @@
(require 'ert-x)
(ert-deftest pp-print-quote ()
(should (string= (pp-to-string 'quote) "quote"))
(should (string= (pp-to-string ''quote) "'quote"))
(should (string= (pp-to-string 'quote) "quote\n"))
(should (string= (pp-to-string ''quote) "'quote\n"))
(should (string= (pp-to-string '('a 'b)) "('a 'b)\n"))
(should (string= (pp-to-string '(''quote 'quote)) "(''quote 'quote)\n"))
(should (string= (pp-to-string '(quote)) "(quote)\n"))