From 4d72b11f05341e109f5898d8da12484171a1f1db Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Wed, 15 Mar 2023 21:29:35 +0100 Subject: [PATCH] tests: extend the test case for gpiod_request_config_set_consumer() Also check that passing a NULL consumer string works as expected. Signed-off-by: Bartosz Golaszewski --- tests/tests-request-config.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/tests-request-config.c b/tests/tests-request-config.c index 71fccde..d3c679a 100644 --- a/tests/tests-request-config.c +++ b/tests/tests-request-config.c @@ -29,6 +29,9 @@ GPIOD_TEST_CASE(set_consumer) gpiod_request_config_set_consumer(config, "foobar"); g_assert_cmpstr(gpiod_request_config_get_consumer(config), ==, "foobar"); + + gpiod_request_config_set_consumer(config, NULL); + g_assert_null(gpiod_request_config_get_consumer(config)); } GPIOD_TEST_CASE(set_event_buffer_size) -- 2.30.2