From: Bartosz Golaszewski Date: Wed, 14 Jun 2017 10:22:02 +0000 (+0200) Subject: tests: gpiomon: check the whole output string X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ac8bcd660d028e29240a48f3341541bf44a90158;p=qemu-gpiodev%2Flibgpiod.git tests: gpiomon: check the whole output string Add the 'event:' prefix to the regex pattern when checking the output of gpiomon. Signed-off-by: Bartosz Golaszewski --- diff --git a/tests/tests-gpiomon.c b/tests/tests-gpiomon.c index 890c1a6..f2de477 100644 --- a/tests/tests-gpiomon.c +++ b/tests/tests-gpiomon.c @@ -22,7 +22,7 @@ static void gpiomon_single_rising_edge_event(void) TEST_ASSERT_NOT_NULL(test_tool_stdout()); TEST_ASSERT_NULL(test_tool_stderr()); TEST_ASSERT_REGEX_MATCH(test_tool_stdout(), - "RISING\\s+EDGE\\s+offset\\:\\s+4\\s+timestamp:\\s+\\[[0-9]+\\.[0-9]+\\]"); + "event\\:\\s+RISING\\s+EDGE\\s+offset\\:\\s+4\\s+timestamp:\\s+\\[[0-9]+\\.[0-9]+\\]"); } TEST_DEFINE(gpiomon_single_rising_edge_event, "tools: gpiomon - single rising edge event", @@ -56,9 +56,9 @@ static void gpiomon_four_alternating_events(void) TEST_ASSERT_NOT_NULL(test_tool_stdout()); TEST_ASSERT_NULL(test_tool_stderr()); TEST_ASSERT_REGEX_MATCH(test_tool_stdout(), - "FALLING\\s+EDGE\\s+offset\\:\\s+4\\s+timestamp:\\s+\\[[0-9]+\\.[0-9]+\\]"); + "event\\:\\s+FALLING\\s+EDGE\\s+offset\\:\\s+4\\s+timestamp:\\s+\\[[0-9]+\\.[0-9]+\\]"); TEST_ASSERT_REGEX_MATCH(test_tool_stdout(), - "RISING\\s+EDGE\\s+offset\\:\\s+4\\s+timestamp:\\s+\\[[0-9]+\\.[0-9]+\\]"); + "event\\:\\s+RISING\\s+EDGE\\s+offset\\:\\s+4\\s+timestamp:\\s+\\[[0-9]+\\.[0-9]+\\]"); } TEST_DEFINE(gpiomon_four_alternating_events, "tools: gpiomon - four alternating events",