tal: simplify.
[ccan] / ccan / tal / test / run-array.c
index 53392da3a902f35689120908959b121786763c69..6212dae52ced2163dedeece78294d1023f36f333 100644 (file)
@@ -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,13 @@ 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();