mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-28 10:50:07 +01:00
test: restore prefix search in the format
Otherwise we get false positives for "pressure:" since that may also
show up in the "Queuing ... " message for tablet events.
Fixes: 9f6b294e36 ("test: print the log message to a buffer, then print the whole lot")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1228>
This commit is contained in:
parent
7516dddeb3
commit
7e6a9f322f
1 changed files with 9 additions and 9 deletions
|
|
@ -1311,21 +1311,21 @@ litest_log_handler(struct libinput *libinput,
|
|||
|
||||
if (!use_colors)
|
||||
color_reset = "";
|
||||
else if (strstr(msg, "tap:"))
|
||||
else if (strstr(format, "tap:"))
|
||||
color = ANSI_BLUE;
|
||||
else if (strstr(msg, "thumb state:"))
|
||||
else if (strstr(format, "thumb state:"))
|
||||
color = ANSI_YELLOW;
|
||||
else if (strstr(msg, "button state:"))
|
||||
else if (strstr(format, "button state:"))
|
||||
color = ANSI_MAGENTA;
|
||||
else if (strstr(msg, "touch-size:") ||
|
||||
strstr(msg, "pressure:"))
|
||||
else if (strstr(format, "touch-size:") ||
|
||||
strstr(format, "pressure:"))
|
||||
color = ANSI_GREEN;
|
||||
else if (strstr(msg, "palm:") ||
|
||||
strstr(msg, "thumb:"))
|
||||
else if (strstr(format, "palm:") ||
|
||||
strstr(format, "thumb:"))
|
||||
color = ANSI_CYAN;
|
||||
else if (strstr(msg, "edge-scroll:"))
|
||||
else if (strstr(format, "edge-scroll:"))
|
||||
color = ANSI_BRIGHT_GREEN;
|
||||
else if (strstr(msg, "gesture:"))
|
||||
else if (strstr(format, "gesture:"))
|
||||
color = ANSI_BRIGHT_YELLOW;
|
||||
|
||||
fprintf(stderr, "%slitest %s %s%s", color, priority, msg, color_reset);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue