test: add missing button state assertion for eraser button release

The second 'Expect button event' block in
tablet_eraser_button_different_buttons is missing the button state
assertion that the first block has. This event should be a
BUTTON_STATE_RELEASED (the eraser left proximity), but without the
check the test passes even if the state is wrong.

Co-Authored-by: Claude Code <noreply@anthropic.com>
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1444>
This commit is contained in:
Peter Hutterer 2026-03-11 20:54:43 +10:00 committed by Marge Bot
parent 32fd9ec95f
commit f86d5ab2ab

View file

@ -8024,6 +8024,8 @@ START_TEST(tablet_eraser_button_different_buttons)
_destroy_(libinput_event) *ev = libinput_get_event(li);
auto tev =
litest_is_tablet_event(ev, LIBINPUT_EVENT_TABLET_TOOL_BUTTON);
litest_assert_enum_eq(libinput_event_tablet_tool_get_button_state(tev),
LIBINPUT_BUTTON_STATE_RELEASED);
litest_assert_int_eq(libinput_event_tablet_tool_get_button(tev),
eraser_button_mapping);
litest_assert_ptr_eq(libinput_event_tablet_tool_get_tool(tev), pen);