From: Rusty Russell Date: Mon, 13 Oct 2025 04:04:29 +0000 (+1030) Subject: tal/path: fix test cases for take(NULL). X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=fd3fd70c7c19ae3db38e4f90e2c45cbe7cda564e;p=ccan tal/path: fix test cases for take(NULL). We no longer accept these, as per tal/str changes. Signed-off-by: Rusty Russell --- diff --git a/ccan/tal/path/test/run-simplify.c b/ccan/tal/path/test/run-simplify.c index 3d1b3514..9591132d 100644 --- a/ccan/tal/path/test/run-simplify.c +++ b/ccan/tal/path/test/run-simplify.c @@ -6,7 +6,7 @@ int main(void) { char cwd[1024], *path, *ctx = tal_strdup(NULL, "ctx"); - plan_tests(87); + plan_tests(85); if (!getcwd(cwd, sizeof(cwd))) abort(); @@ -234,10 +234,6 @@ int main(void) tal_free(path); ok1(tal_first(ctx) == NULL); - path = path_simplify(ctx, take(NULL)); - ok1(!path); - ok1(tal_first(ctx) == NULL); - tal_free(ctx); return exit_status(); diff --git a/ccan/tal/path/test/run-split.c b/ccan/tal/path/test/run-split.c index 1083cc88..7b524cb0 100644 --- a/ccan/tal/path/test/run-split.c +++ b/ccan/tal/path/test/run-split.c @@ -6,7 +6,7 @@ int main(void) { char *ctx = tal_strdup(NULL, "ctx"), **split; - plan_tests(46); + plan_tests(44); split = path_split(ctx, "foo" PATH_SEP_STR "bar"); ok1(tal_parent(split) == ctx); @@ -94,10 +94,6 @@ int main(void) tal_free(split); ok1(tal_first(ctx) == NULL); - split = path_split(ctx, take(NULL)); - ok1(!split); - ok1(tal_first(ctx) == NULL); - ok1(tal_first(NULL) == ctx && tal_next(ctx) == NULL && tal_first(ctx) == NULL); tal_free(ctx);