X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftal%2Ftest%2Frun-array.c;fp=ccan%2Ftal%2Ftest%2Frun-array.c;h=a87650c346a06eccdbfa739b39536cb2502e7065;hb=7ca46909f86e8bbad4e4bb19cac1a75d4ebf3df6;hp=53392da3a902f35689120908959b121786763c69;hpb=34c2962d00c4ec24f248bddfd42f2e79cc6b61ef;p=ccan diff --git a/ccan/tal/test/run-array.c b/ccan/tal/test/run-array.c index 53392da3..a87650c3 100644 --- a/ccan/tal/test/run-array.c +++ b/ccan/tal/test/run-array.c @@ -7,7 +7,7 @@ int main(void) char *parent, *c[4]; int i; - plan_tests(9); + plan_tests(11); parent = tal(NULL, char); ok1(parent); @@ -33,6 +33,14 @@ int main(void) strcpy(c[i], "abc"); tal_free(c[i]); } + + /* Resizing. */ + c[0] = tal_arrz(parent, char, 4); + ok1(tal_resize(&c[0], 6)); + strcpy(c[0], "hello"); + tal_free(c[0]); + ok1(tal_first(parent) == NULL); + tal_free(parent); return exit_status();