tal/str: always create strings which have tal_count() == strlen() + 1.
[ccan] / ccan / tal / str / test / run-fmt-terminate.c
index 374ca03a1fed893f017cc89c632c13d41a2507ed..3474cdfa180a46c48ae0e70ed3fc0a59974e94b1 100644 (file)
@@ -11,11 +11,12 @@ int main(void)
        char *str;
        const char *fmt = "";
 
-       plan_tests(1);
+       plan_tests(2);
        /* GCC complains about empty format string, complains about non-literal
         * with no args... */
        str = tal_fmt(NULL, fmt, "");
        ok1(!strcmp(str, ""));
+       ok1(tal_count(str) == strlen(str) + 1);
        tal_free(str);
 
        return exit_status();