From 8336721dc0d08864aa531c05523c3cdf73b8549d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 1 Aug 2025 11:33:17 +1000 Subject: [PATCH] test: fix the keycode obfuscation test An earlier version of 73103a5c38c4 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: 73103a5c38c4 ("plugin: always obfuscate keycodes") Part-of: --- test/test-keyboard.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test/test-keyboard.c b/test/test-keyboard.c index e76c58f7..5e0a9a7e 100644 --- a/test/test-keyboard.c +++ b/test/test-keyboard.c @@ -544,18 +544,14 @@ START_TEST(keyboard_keycode_obfuscation) * Queuing event14 KEYBOARD_KEY +0.000s KEY_Q (16) released * 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 */ char **strv = capture->debugs; - size_t index; - 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)); + litest_assert_strv_no_substring(strv, "KEY_Q"); strv = capture->debugs; + size_t index; litest_assert(strv_find_substring(strv, "KEY_A", &index)); do { litest_assert_str_in("EV_KEY", strv[index]);