X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_mount_test.c;h=d9d685ae7bf09fafca10fb1278a97d0fb84a6d87;hb=704a0fed3a3dd9ea009168ca44818739b34f907e;hp=c5ffbfbcf9fb9d701db96f02aafa1cc9873b4790;hpb=25b5f5c49dd50c64f41b7bf69b8e471b0ffc6f15;p=collectd.git diff --git a/src/utils_mount_test.c b/src/utils_mount_test.c index c5ffbfbc..d9d685ae 100644 --- a/src/utils_mount_test.c +++ b/src/utils_mount_test.c @@ -24,10 +24,14 @@ * Florian octo Forster */ -#include "testing.h" #include "collectd.h" +#include "testing.h" #include "utils_mount.h" +#if HAVE_LIBKSTAT +kstat_ctl_t *kc; +#endif /* HAVE_LIBKSTAT */ + DEF_TEST(cu_mount_checkoption) { char line_opts[] = "foo=one,bar=two,qux=three"; @@ -77,14 +81,14 @@ DEF_TEST(cu_mount_getoptionvalue) char line_opts[] = "foo=one,bar=two,qux=three"; char line_bool[] = "one,two,three"; - STREQ ("one", cu_mount_getoptionvalue (line_opts, "foo=")); - STREQ ("two", cu_mount_getoptionvalue (line_opts, "bar=")); - STREQ ("three", cu_mount_getoptionvalue (line_opts, "qux=")); + EXPECT_EQ_STR ("one", cu_mount_getoptionvalue (line_opts, "foo=")); + EXPECT_EQ_STR ("two", cu_mount_getoptionvalue (line_opts, "bar=")); + EXPECT_EQ_STR ("three", cu_mount_getoptionvalue (line_opts, "qux=")); OK (NULL == cu_mount_getoptionvalue (line_opts, "unknown=")); - STREQ ("", cu_mount_getoptionvalue (line_bool, "one")); - STREQ ("", cu_mount_getoptionvalue (line_bool, "two")); - STREQ ("", cu_mount_getoptionvalue (line_bool, "three")); + EXPECT_EQ_STR ("", cu_mount_getoptionvalue (line_bool, "one")); + EXPECT_EQ_STR ("", cu_mount_getoptionvalue (line_bool, "two")); + EXPECT_EQ_STR ("", cu_mount_getoptionvalue (line_bool, "three")); OK (NULL == cu_mount_getoptionvalue (line_bool, "four")); return (0);