1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

* test/lisp/emacs-lisp/map-ynp-tests.el: Silence backtrace.

(test-map-ynp-kmacro): Ignore 'backtrace-print' that prints
unrequested backtrace (bug#67836).
This commit is contained in:
Juri Linkov 2025-11-04 19:23:55 +02:00
parent 959345f602
commit 2bec93b5f4

View file

@ -33,14 +33,15 @@
(ert-deftest test-map-ynp-kmacro ()
"Test that `map-y-or-n-p' in a kmacro terminates on end of input."
(execute-kbd-macro (read-kbd-macro "M-: (map-ynp-tests-simple-call) RET y"))
(should-error
(execute-kbd-macro (read-kbd-macro "M-: (map-ynp-tests-simple-call) RET")))
(unless noninteractive
(let ((noninteractive t))
(execute-kbd-macro (read-kbd-macro "M-: (map-ynp-tests-simple-call) RET y"))
(should-error
(execute-kbd-macro (read-kbd-macro "M-: (map-ynp-tests-simple-call) RET"))))))
(cl-letf* (((symbol-function #'backtrace-print) (lambda ()))) ;; bug#67836
(execute-kbd-macro (read-kbd-macro "M-: (map-ynp-tests-simple-call) RET y"))
(should-error
(execute-kbd-macro (read-kbd-macro "M-: (map-ynp-tests-simple-call) RET")))
(unless noninteractive
(let ((noninteractive t))
(execute-kbd-macro (read-kbd-macro "M-: (map-ynp-tests-simple-call) RET y"))
(should-error
(execute-kbd-macro (read-kbd-macro "M-: (map-ynp-tests-simple-call) RET")))))))
(provide 'map-ynp-tests)
;;; map-ynp-tests.el ends here