From: Thuna Date: Wed, 12 Feb 2025 22:34:16 +0000 (+0100) Subject: Fix print-tests X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=87de8ff1098e48c3b54c3f7263e3db04ef4bb8c2;p=emacs.git Fix print-tests * test/src/print-tests.el (terpri): Erase the buffer *terpri-test* before individual runs. (Bug#72334) (print-circle): Allow circular references with number greater than 9. (cherry picked from commit 5f1d52c43b5eafeb4938d99c275e78c9155f4142) --- diff --git a/test/src/print-tests.el b/test/src/print-tests.el index ddee6d914a4..1a04cf73f30 100644 --- a/test/src/print-tests.el +++ b/test/src/print-tests.el @@ -130,6 +130,7 @@ otherwise, use a different charset." "abc\n"))) (let ((standard-output (with-current-buffer (get-buffer-create "*terpri-test*") + (erase-buffer) (insert "--------") (point-max-marker)))) (should (terpri nil t)) @@ -338,7 +339,7 @@ otherwise, use a different charset." (print-tests--deftest print-circle () (let ((x '(#1=(a . #1#) #1#))) (let ((print-circle nil)) - (should (string-match "\\`((a . #[0-9]) (a . #[0-9]))\\'" + (should (string-match "\\`((a . #[0-9]+) (a . #[0-9]+))\\'" (print-tests--prin1-to-string x)))) (let ((print-circle t)) (should (equal "(#1=(a . #1#) #1#)" (print-tests--prin1-to-string x))))))