diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-01-29 11:17:15 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-01-29 12:41:28 +0100 |
commit | fd746a04d65ef9abd8bd3f6495ab09a8e9616289 (patch) | |
tree | f85a96c38c4af5f3098ea3693a4ea56ff8606901 /tests | |
parent | be0c04f49857109170bd6687d2a3a585369b02b9 (diff) | |
download | weechat-fd746a04d65ef9abd8bd3f6495ab09a8e9616289.zip |
core: force ctrl keys to lower case when they are added (closes #1875)
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/scripts/python/unparse.py | 4 | ||||
-rw-r--r-- | tests/unit/gui/test-gui-key.cpp | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/scripts/python/unparse.py b/tests/scripts/python/unparse.py index cf1af184e..12ec858a5 100755 --- a/tests/scripts/python/unparse.py +++ b/tests/scripts/python/unparse.py @@ -1386,13 +1386,13 @@ def get_stdin(): """ Return data from standard input. - If there is nothing in stdin, wait for data until ctrl-D (EOF) + If there is nothing in stdin, wait for data until ctrl-d (EOF) is received. """ data = '' inr = select.select([sys.stdin], [], [], 0)[0] if not inr: - print('Enter the code to convert (Enter + ctrl+D to end)') + print('Enter the code to convert (Enter + ctrl-d to end)') while True: inr = select.select([sys.stdin], [], [], 0.1)[0] if not inr: diff --git a/tests/unit/gui/test-gui-key.cpp b/tests/unit/gui/test-gui-key.cpp index 4d13b13ff..497d999d5 100644 --- a/tests/unit/gui/test-gui-key.cpp +++ b/tests/unit/gui/test-gui-key.cpp @@ -111,7 +111,8 @@ TEST(GuiKey, GetInternalCode) WEE_TEST_STR("\x01[[A", gui_key_get_internal_code ("meta2-A")); WEE_TEST_STR("\x01[[a", gui_key_get_internal_code ("meta2-a")); - WEE_TEST_STR("\x01" "A", gui_key_get_internal_code ("ctrl-A")); + /* ctrl-letter keys are forced to lower case */ + WEE_TEST_STR("\x01" "a", gui_key_get_internal_code ("ctrl-A")); WEE_TEST_STR("\x01" "a", gui_key_get_internal_code ("ctrl-a")); WEE_TEST_STR(" ", gui_key_get_internal_code ("space")); |