From: Eshel Yaron Date: Thu, 28 Mar 2024 17:11:15 +0000 (+0100) Subject: ; Adjust 'read-multiple-choice' test X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6c137669545e73cd9c6f9308a24a83cc5d9fd6c9;p=emacs.git ; Adjust 'read-multiple-choice' test --- diff --git a/lisp/emacs-lisp/rmc.el b/lisp/emacs-lisp/rmc.el index daf40c63050..11ccc99ccb2 100644 --- a/lisp/emacs-lisp/rmc.el +++ b/lisp/emacs-lisp/rmc.el @@ -263,6 +263,7 @@ Usage example: (cons (capitalize (cadr elem)) elem)) choices))) (while (not result) + (setq invalid-choice nil) (when tchar (pcase (lookup-key query-replace-map (vector tchar) t) ('help diff --git a/test/lisp/emacs-lisp/rmc-tests.el b/test/lisp/emacs-lisp/rmc-tests.el index b1fbcd25bd0..9b494918d7c 100644 --- a/test/lisp/emacs-lisp/rmc-tests.el +++ b/test/lisp/emacs-lisp/rmc-tests.el @@ -67,7 +67,7 @@ (read-multiple-choice "Do it? " '((?y "yes") (?n "no")))))))) (ert-deftest test-read-multiple-choice-help () - (let ((chars '(?o ?a)) + (let ((chars '(?? ?a)) help) (cl-letf* (((symbol-function #'read-event) (lambda ()