; Fix read-multiple-choice test

* test/lisp/emacs-lisp/rmc-tests.el (test-read-multiple-choice):
Rebind read-event, read-multiple-choice uses that since 2019-05-26
"Avoid infloop in read-multiple-choice (Bug#32257)".
This commit is contained in:
Noam Postavsky 2019-05-26 21:55:00 -04:00
parent 9d5906d9d2
commit dc9f8c1c63

View file

@ -31,7 +31,7 @@
(ert-deftest test-read-multiple-choice ()
(dolist (char '(?y ?n))
(cl-letf* (((symbol-function #'read-char) (lambda () char))
(cl-letf* (((symbol-function #'read-event) (lambda () char))
(str (if (eq char ?y) "yes" "no")))
(should (equal (list char str)
(read-multiple-choice "Do it? " '((?y "yes") (?n "no"))))))))