mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-28 07:20:06 +01:00
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:
parent
784241427b
commit
47fbd8f98f
1 changed files with 14 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue