From: Robert Pluim Date: Tue, 14 May 2024 15:41:57 +0000 (+0200) Subject: Add multi/unibyte string tests for key-description X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~2^2~20^2~1481 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=cdf49336cd06c433d2aa7795672aebe413c92f54;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. --- 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)