test: fix the keycode obfuscation test

An earlier version of 73103a5c38 only obfuscated the plugin key codes,
not the "Queuing ..." message libinput itself uses. The test didn't get
updated when the queuing message was updated to obfuscate.

Fixes: 73103a5c38 ("plugin: always obfuscate keycodes")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1284>
This commit is contained in:
Peter Hutterer 2025-08-01 11:33:17 +10:00 committed by Marge Bot
parent 6dfd72dc03
commit 8336721dc0

View file

@ -544,18 +544,14 @@ START_TEST(keyboard_keycode_obfuscation)
* Queuing event14 KEYBOARD_KEY +0.000s KEY_Q (16) released * Queuing event14 KEYBOARD_KEY +0.000s KEY_Q (16) released
* event14: plugin evdev - 0.000 EV_KEY KEY_Q 0 * event14: plugin evdev - 0.000 EV_KEY KEY_Q 0
* *
* The latter must not exist, it must be obfuscated to KEY_A * Both KEY_Q must be obfuscated to KEY_A
*/ */
/* clang-format on */ /* clang-format on */
char **strv = capture->debugs; char **strv = capture->debugs;
size_t index; litest_assert_strv_no_substring(strv, "KEY_Q");
litest_assert(strv_find_substring(strv, "KEY_Q", &index));
do {
litest_assert_str_not_in("EV_KEY", strv[index]);
strv += index + 1;
} while (strv_find_substring(strv, "KEY_Q", &index));
strv = capture->debugs; strv = capture->debugs;
size_t index;
litest_assert(strv_find_substring(strv, "KEY_A", &index)); litest_assert(strv_find_substring(strv, "KEY_A", &index));
do { do {
litest_assert_str_in("EV_KEY", strv[index]); litest_assert_str_in("EV_KEY", strv[index]);