From 3101f06ac229d0af159b13f3972b70b62b0f0e8b Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Tue, 14 May 2024 17:41:57 +0200 Subject: [PATCH] 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) --- test/src/keymap-tests.el | 7 +++++++ 1 file changed, 7 insertions(+) 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) -- 2.39.5