-
- STREQ ("one", cu_mount_getoptionvalue (line_opts, "foo="));
- STREQ ("two", cu_mount_getoptionvalue (line_opts, "bar="));
- STREQ ("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"));
- OK (NULL == cu_mount_getoptionvalue (line_bool, "four"));
+ char *v;
+
+ EXPECT_EQ_STR ("one", v = cu_mount_getoptionvalue (line_opts, "foo="));
+ sfree (v);
+ EXPECT_EQ_STR ("two", v = cu_mount_getoptionvalue (line_opts, "bar="));
+ sfree (v);
+ EXPECT_EQ_STR ("three", v = cu_mount_getoptionvalue (line_opts, "qux="));
+ sfree (v);
+ OK (NULL == (v = cu_mount_getoptionvalue (line_opts, "unknown=")));
+ sfree (v);
+
+ EXPECT_EQ_STR ("", v = cu_mount_getoptionvalue (line_bool, "one"));
+ sfree (v);
+ EXPECT_EQ_STR ("", v = cu_mount_getoptionvalue (line_bool, "two"));
+ sfree (v);
+ EXPECT_EQ_STR ("", v = cu_mount_getoptionvalue (line_bool, "three"));
+ sfree (v);
+ OK (NULL == (v = cu_mount_getoptionvalue (line_bool, "four")));
+ sfree (v);