diff options
| author | Thuna | 2025-02-12 23:34:16 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2025-02-23 01:34:46 +0100 |
| commit | 5f1d52c43b5eafeb4938d99c275e78c9155f4142 (patch) | |
| tree | 3d496cc6996901cb365766d35eb57fcd29d3bf7f /test/src | |
| parent | f549cedaa2721bfc463fe714c00016aed21f7b5c (diff) | |
| download | emacs-5f1d52c43b5eafeb4938d99c275e78c9155f4142.tar.gz emacs-5f1d52c43b5eafeb4938d99c275e78c9155f4142.zip | |
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.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/print-tests.el | 3 |
1 files changed, 2 insertions, 1 deletions
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." | |||
| 130 | "abc\n"))) | 130 | "abc\n"))) |
| 131 | (let ((standard-output | 131 | (let ((standard-output |
| 132 | (with-current-buffer (get-buffer-create "*terpri-test*") | 132 | (with-current-buffer (get-buffer-create "*terpri-test*") |
| 133 | (erase-buffer) | ||
| 133 | (insert "--------") | 134 | (insert "--------") |
| 134 | (point-max-marker)))) | 135 | (point-max-marker)))) |
| 135 | (should (terpri nil t)) | 136 | (should (terpri nil t)) |
| @@ -338,7 +339,7 @@ otherwise, use a different charset." | |||
| 338 | (print-tests--deftest print-circle () | 339 | (print-tests--deftest print-circle () |
| 339 | (let ((x '(#1=(a . #1#) #1#))) | 340 | (let ((x '(#1=(a . #1#) #1#))) |
| 340 | (let ((print-circle nil)) | 341 | (let ((print-circle nil)) |
| 341 | (should (string-match "\\`((a . #[0-9]) (a . #[0-9]))\\'" | 342 | (should (string-match "\\`((a . #[0-9]+) (a . #[0-9]+))\\'" |
| 342 | (print-tests--prin1-to-string x)))) | 343 | (print-tests--prin1-to-string x)))) |
| 343 | (let ((print-circle t)) | 344 | (let ((print-circle t)) |
| 344 | (should (equal "(#1=(a . #1#) #1#)" (print-tests--prin1-to-string x)))))) | 345 | (should (equal "(#1=(a . #1#) #1#)" (print-tests--prin1-to-string x)))))) |