test: semi-fix the switch_suspend_with_touchpad test

This used to do nothing, now at least it does the same thing as the
corresponding keyboard test. It merely tests the switch going on/off while a
touchpad is present, so short of an unexpected error message or a crash this
test doesn't actually test for any specific behavior.

Fixes #502

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2020-08-03 15:23:51 +10:00
parent 0e7beaa058
commit a014df1081

View file

@ -691,11 +691,16 @@ START_TEST(switch_suspend_with_touchpad)
litest_drain_events(li);
touchpad = litest_add_device(li, LITEST_SYNAPTICS_I2C);
litest_delete_device(touchpad);
touchpad = litest_add_device(li, LITEST_SYNAPTICS_I2C);
litest_drain_events(li);
litest_grab_device(sw);
litest_switch_action(sw, which, LIBINPUT_SWITCH_STATE_ON);
litest_drain_events(li);
litest_switch_action(sw, which, LIBINPUT_SWITCH_STATE_OFF);
litest_drain_events(li);
litest_ungrab_device(sw);
litest_delete_device(sw);
litest_drain_events(li);
litest_delete_device(touchpad);