test: switch another test to use logcapture

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1284>
This commit is contained in:
Peter Hutterer 2025-06-27 13:28:23 +10:00 committed by Marge Bot
parent d9a4667a14
commit ce85ee7d35

View file

@ -839,8 +839,7 @@ START_TEST(pointer_scroll_wheel_hires_send_only_lores)
* sure we handle this correctly. * sure we handle this correctly.
*/ */
litest_drain_events(dev->libinput); litest_drain_events(dev->libinput);
litest_set_log_handler_bug(li); litest_with_logcapture(li, capture) {
litest_event(dev, EV_REL, lores_code, 1); litest_event(dev, EV_REL, lores_code, 1);
litest_event(dev, EV_SYN, SYN_REPORT, 0); litest_event(dev, EV_SYN, SYN_REPORT, 0);
litest_dispatch(li); litest_dispatch(li);
@ -857,7 +856,11 @@ START_TEST(pointer_scroll_wheel_hires_send_only_lores)
test_high_and_low_wheel_events_value(dev, lores_code, direction * 240); test_high_and_low_wheel_events_value(dev, lores_code, direction * 240);
litest_assert_empty_queue(li); litest_assert_empty_queue(li);
litest_restore_log_handler(li);
litest_assert_strv_substring(
capture->bugs,
"only low-resolution events have been received.");
}
} }
END_TEST END_TEST