summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d047c6c)
raw | patch | inline | side by side (parent: d047c6c)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 12 Mar 2016 14:38:01 +0000 (15:38 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 12 Mar 2016 14:38:01 +0000 (15:38 +0100) |
src/daemon/utils_subst_test.c | patch | blob | history |
index ec2e3514f2d11f4d14c1ff246478281b0da17db7..953ccc4c3b18505073eb134f31d77e0bf9614197 100644 (file)
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 */
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"},