Add multi/unibyte string tests for key-description

* test/src/keymap-tests.el (keymap--key-description): Add multi/unibyte
tests.

This is to check the fix for Bug#59305.
scratch/igc
Robert Pluim 2024-05-14 17:41:57 +02:00
parent c22b91fd9c
commit cdf49336cd
1 changed files with 7 additions and 0 deletions

View File

@ -357,6 +357,13 @@ g .. h foo
"C-x <right>"))
(should (equal (key-description [M-H-right] [?\C-x])
"C-x M-H-<right>"))
;; Treat latin-1 correctly vs meta. (Bug#59305)
(should (equal (key-description "olá")
"o l á"))
(should (equal (key-description (string ?o ?l ))
"o l á"))
(should (equal (key-description (unibyte-string ?o ?l ))
"o l M-a"))
(should (equal (single-key-description 'home)
"<home>"))
(should (equal (single-key-description 'home t)