[PATCH libevdev] test: check for enabling REL_X with data

Peter Hutterer peter.hutterer at who-t.net
Mon Jul 29 21:31:28 PDT 2013


Only EV_REP and EV_ABS accept data.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 test/test-libevdev-has-event.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/test-libevdev-has-event.c b/test/test-libevdev-has-event.c
index a14f99e..94b8f4c 100644
--- a/test/test-libevdev-has-event.c
+++ b/test/test-libevdev-has-event.c
@@ -753,6 +753,7 @@ START_TEST(test_device_enable_bit_invalid)
 	ck_assert_int_eq(libevdev_enable_event_type(dev, EV_MAX + 1), -1);
 
 	ck_assert_int_eq(libevdev_enable_event_code(dev, EV_ABS, ABS_Y, NULL), -1);
+	ck_assert_int_eq(libevdev_enable_event_code(dev, EV_REL, REL_X, &abs), -1);
 
 	uinput_device_free(uidev);
 	libevdev_free(dev);
-- 
1.8.2.1



More information about the Input-tools mailing list