From: Robert Pluim Date: Tue, 14 May 2024 15:41:57 +0000 (+0200) Subject: Add multi/unibyte string tests for key-description X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3101f06ac229d0af159b13f3972b70b62b0f0e8b;p=emacs.git 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. (cherry picked from commit cdf49336cd06c433d2aa7795672aebe413c92f54) --- diff --git a/test/src/keymap-tests.el b/test/src/keymap-tests.el index 04b897045db..e968a19eadf 100644 --- a/test/src/keymap-tests.el +++ b/test/src/keymap-tests.el @@ -357,6 +357,13 @@ g .. h foo "C-x ")) (should (equal (key-description [M-H-right] [?\C-x]) "C-x M-H-")) + ;; 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) "")) (should (equal (single-key-description 'home t)