From 0206052b5660cb77cdd0a0ac3c83dd4c3d996007 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 9 Jul 2018 15:48:55 -0700 Subject: started on positioning + command structure --- ccan/tal/str/test/run-fmt-terminate.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 ccan/tal/str/test/run-fmt-terminate.c (limited to 'ccan/tal/str/test/run-fmt-terminate.c') diff --git a/ccan/tal/str/test/run-fmt-terminate.c b/ccan/tal/str/test/run-fmt-terminate.c new file mode 100644 index 0000000..374ca03 --- /dev/null +++ b/ccan/tal/str/test/run-fmt-terminate.c @@ -0,0 +1,22 @@ +#include +#include +#include +#include +#include +#include "helper.h" + +/* Empty format string: should still terminate! */ +int main(void) +{ + char *str; + const char *fmt = ""; + + plan_tests(1); + /* GCC complains about empty format string, complains about non-literal + * with no args... */ + str = tal_fmt(NULL, fmt, ""); + ok1(!strcmp(str, "")); + tal_free(str); + + return exit_status(); +} -- cgit v1.2.3