[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master fb9b7b70f5: Fix read-multiple-choice tests
From: |
Stefan Kangas |
Subject: |
master fb9b7b70f5: Fix read-multiple-choice tests |
Date: |
Mon, 27 Dec 2021 18:11:32 -0500 (EST) |
branch: master
commit fb9b7b70f55dd49d3019a9c69663076e942d857e
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
Fix read-multiple-choice tests
* lisp/emacs-lisp/rmc.el (rmc--add-key-description): Fix typo.
* test/lisp/emacs-lisp/rmc-tests.el
(test-rmc--add-key-description)
(test-rmc--add-key-description/with-attributes)
(test-rmc--add-key-description/non-graphical-display): Fix tests.
---
lisp/emacs-lisp/rmc.el | 2 +-
test/lisp/emacs-lisp/rmc-tests.el | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lisp/emacs-lisp/rmc.el b/lisp/emacs-lisp/rmc.el
index 9d5fe40f9a..ed764f5350 100644
--- a/lisp/emacs-lisp/rmc.el
+++ b/lisp/emacs-lisp/rmc.el
@@ -41,7 +41,7 @@
(format "%s %s"
(if graphical-terminal
(propertize desc 'face 'read-multiple-choice-face)
- (propertize desc 'face 'help-key-name))
+ (propertize desc 'face 'help-key-binding))
name))
;; The prompt character is in the name, so highlight
;; it on graphical terminals.
diff --git a/test/lisp/emacs-lisp/rmc-tests.el
b/test/lisp/emacs-lisp/rmc-tests.el
index 5a79c505ae..c1e838d051 100644
--- a/test/lisp/emacs-lisp/rmc-tests.el
+++ b/test/lisp/emacs-lisp/rmc-tests.el
@@ -34,9 +34,9 @@
(should (equal (rmc--add-key-description '(?y "yes"))
'(?y . "yes")))
(should (equal (rmc--add-key-description '(?n "foo"))
- '(?n . "[n] foo")))
+ '(?n . "n foo")))
(should (equal (rmc--add-key-description '(?\s "foo bar"))
- `(?\s . "[SPC] foo bar")))))
+ `(?\s . "SPC foo bar")))))
(ert-deftest test-rmc--add-key-description/with-attributes ()
(cl-letf (((symbol-function 'display-supports-face-attributes-p) (lambda (_
_) t)))
@@ -45,10 +45,10 @@
`(?y . ,(concat (propertize "y" 'face 'read-multiple-choice-face)
"es"))))
(should (equal-including-properties
(rmc--add-key-description '(?n "foo"))
- `(?n . ,(concat "[" (propertize "n" 'face
'read-multiple-choice-face) "] foo"))))
+ `(?n . ,(concat (propertize "n" 'face 'read-multiple-choice-face)
" foo"))))
(should (equal-including-properties
(rmc--add-key-description '(?\s "foo bar"))
- `(?\s . ,(concat "[" (propertize "SPC" 'face
'read-multiple-choice-face) "] foo bar"))))))
+ `(?\s . ,(concat (propertize "SPC" 'face
'read-multiple-choice-face) " foo bar"))))))
(ert-deftest test-rmc--add-key-description/non-graphical-display ()
(cl-letf (((symbol-function 'display-supports-face-attributes-p) (lambda (_
_) nil)))
@@ -57,7 +57,7 @@
'(?y . "[Y]es")))
(should (equal-including-properties
(rmc--add-key-description '(?n "foo"))
- '(?n . "[n] foo")))))
+ `(?n . ,(concat (propertize "n" 'face 'help-key-binding) "
foo"))))))
(ert-deftest test-read-multiple-choice ()
(dolist (char '(?y ?n))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master fb9b7b70f5: Fix read-multiple-choice tests,
Stefan Kangas <=