X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=ccan%2Ftal%2Fstr%2Ftest%2Frun-strreg.c;h=fa8a86c66e6127872b1313644e343dc1d05860c2;hb=c8e75cdce11b3ad7db6c1fff580c587395b59965;hp=6d126f3970a13acdbed21cbb63e0115e1aa9d477;hpb=d61a0d6c2c9d2b385075338665d64ae1d1bbe3dc;p=ccan diff --git a/ccan/tal/str/test/run-strreg.c b/ccan/tal/str/test/run-strreg.c index 6d126f39..fa8a86c6 100644 --- a/ccan/tal/str/test/run-strreg.c +++ b/ccan/tal/str/test/run-strreg.c @@ -21,7 +21,7 @@ int main(int argc, char *argv[]) /* If it accesses this, it will crash. */ char **invalid = (char **)1L; - plan_tests(40); + plan_tests(41); /* Simple matching. */ ok1(tal_strreg(ctx, "hello world!", "hello") == true); ok1(tal_strreg(ctx, "hello world!", "hi") == false); @@ -116,5 +116,9 @@ int main(int argc, char *argv[]) ok1(no_children(ctx)); tal_free(ctx); + /* Don't get fooled by \(! */ + ok1(tal_strreg(ctx, "(hello) (world)!", "\\([a-z]*\\) \\([a-z]+\\)", + invalid) == true); + return exit_status(); }