Merge pull request #1832 from rubenk/check-for-c99-compiler
[collectd.git] / src / daemon / utils_subst_test.c
index ec2e351..c180b7d 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "common.h" /* for STATIC_ARRAY_SIZE */
 #include "collectd.h"
+
 #include "testing.h"
 #include "utils_subst.h"
 
@@ -36,11 +37,11 @@ kstat_ctl_t *kc;
 DEF_TEST(subst)
 {
   struct {
-    char *str;
+    const char *str;
     int off1;
     int off2;
-    char *rplmt;
-    char *want;
+    const char *rplmt;
+    const char *want;
   } cases[] = {
     {"foo_____bar", 3, 8, " - ", "foo - bar"}, /* documentation example */
     {"foo bar", 0, 2, "m",     "mo bar"},    /* beginning, shorten */
@@ -95,7 +96,10 @@ DEF_TEST(subst)
 DEF_TEST(subst_string)
 {
   struct {
-    char *str;          char *srch; char *rplmt; char *want;
+    const char *str;
+    const char *srch;
+    const char *rplmt;
+    const char *want;
   } cases[] = {
     {"Hello %{name}",    "%{name}", "world", "Hello world"},
     {"abcccccc",         "abc",     "cab",   "ccccccab"},