* 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)
"abc\n")))
(let ((standard-output
(with-current-buffer (get-buffer-create "*terpri-test*")
+ (erase-buffer)
(insert "--------")
(point-max-marker))))
(should (terpri nil t))
(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))))))