test: add basic test for getting the physical seat name

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2017-02-09 10:32:02 +10:00
parent 784241427b
commit 47fbd8f98f

View file

@ -1571,6 +1571,18 @@ START_TEST(device_no_output)
}
END_TEST
START_TEST(device_seat_phys_name)
{
struct litest_device *dev = litest_current_device();
struct libinput_device *device = dev->libinput_device;
struct libinput_seat *seat = libinput_device_get_seat(device);
const char *seat_name;
seat_name = libinput_seat_get_physical_name(seat);
ck_assert(streq(seat_name, "seat0"));
}
END_TEST
void
litest_setup_tests_device(void)
{
@ -1648,4 +1660,6 @@ litest_setup_tests_device(void)
litest_add_for_device("device:output", device_get_output, LITEST_CALIBRATED_TOUCHSCREEN);
litest_add("device:output", device_no_output, LITEST_RELATIVE, LITEST_ANY);
litest_add("device:output", device_no_output, LITEST_KEYS, LITEST_ANY);
litest_add("device:seat", device_seat_phys_name, LITEST_ANY, LITEST_ANY);
}