tests: gpiomon: use a different unknown custom format specifier
authorBartosz Golaszewski <bartekgola@gmail.com>
Wed, 21 Jun 2017 08:21:44 +0000 (10:21 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Wed, 21 Jun 2017 08:21:44 +0000 (10:21 +0200)
We previously used a character that is not interpreted by
printf()-like functions due to a bug in the testing framework.

This is now fixed, so just use %x so that we self-test the test suite
at the same time.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
tests/tests-gpiomon.c

index 884c45a1042eb291dd78c23998ea2215b0d7b61e..4080af9bf7745e27e5e76b33f02b97028240b8f0 100644 (file)
@@ -261,7 +261,7 @@ TEST_DEFINE(gpiomon_custom_format_double_percent,
 
 static void gpiomon_custom_format_unknown_specifier(void)
 {
-       test_tool_run("gpiomon", "--num-events=1", "--format=%w",
+       test_tool_run("gpiomon", "--num-events=1", "--format=%x",
                      test_chip_name(0), "3", (char *)NULL);
        test_set_event(0, 3, TEST_EVENT_RISING, 100);
        test_tool_wait();
@@ -270,7 +270,7 @@ static void gpiomon_custom_format_unknown_specifier(void)
        TEST_ASSERT_RET_OK(test_tool_exit_status());
        TEST_ASSERT_NOT_NULL(test_tool_stdout());
        TEST_ASSERT_NULL(test_tool_stderr());
-       TEST_ASSERT_STR_EQ(test_tool_stdout(), "%w\n");
+       TEST_ASSERT_STR_EQ(test_tool_stdout(), "%x\n");
 }
 TEST_DEFINE(gpiomon_custom_format_unknown_specifier,
            "tools: gpiomon - custom output format: unknown specifier",