X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftal%2Fpath%2Ftest%2Frun-join.c;fp=ccan%2Ftal%2Fpath%2Ftest%2Frun-join.c;h=3961cbb132401bd6a68f5ae4d5c4df5fb3922e12;hb=e81b527384ad5331a9cd35a9f21bc8ac6b16d137;hp=a4f63b317f4a6881885100b433cb5f266a82dade;hpb=5e37a0febfb89a2535f2eb9f0ea06a5546a39234;p=ccan diff --git a/ccan/tal/path/test/run-join.c b/ccan/tal/path/test/run-join.c index a4f63b31..3961cbb1 100644 --- a/ccan/tal/path/test/run-join.c +++ b/ccan/tal/path/test/run-join.c @@ -32,39 +32,39 @@ int main(void) path = path_join(ctx, "foo", take(tal_strdup(ctx, "bar"))); ok1(streq(path, "foo/bar")); ok1(tal_parent(path) == ctx); - ok1(tal_first(ctx) == path && tal_next(ctx, path) == NULL); + ok1(tal_first(ctx) == path && tal_next(path) == NULL && tal_first(path) == NULL); tal_free(path); path = path_join(ctx, "foo", take(tal_strdup(ctx, "/bar"))); ok1(streq(path, "/bar")); ok1(tal_parent(path) == ctx); - ok1(tal_first(ctx) == path && tal_next(ctx, path) == NULL); + ok1(tal_first(ctx) == path && tal_next(path) == NULL && tal_first(path) == NULL); tal_free(path); path = path_join(ctx, take(tal_strdup(ctx, "foo")), "bar"); ok1(streq(path, "foo/bar")); ok1(tal_parent(path) == ctx); - ok1(tal_first(ctx) == path && tal_next(ctx, path) == NULL); + ok1(tal_first(ctx) == path && tal_next(path) == NULL && tal_first(path) == NULL); tal_free(path); path = path_join(ctx, take(tal_strdup(ctx, "foo")), "/bar"); ok1(streq(path, "/bar")); ok1(tal_parent(path) == ctx); - ok1(tal_first(ctx) == path && tal_next(ctx, path) == NULL); + ok1(tal_first(ctx) == path && tal_next(path) == NULL && tal_first(path) == NULL); tal_free(path); path = path_join(ctx, take(tal_strdup(ctx, "foo")), take(tal_strdup(ctx, "bar"))); ok1(streq(path, "foo/bar")); ok1(tal_parent(path) == ctx); - ok1(tal_first(ctx) == path && tal_next(ctx, path) == NULL); + ok1(tal_first(ctx) == path && tal_next(path) == NULL && tal_first(path) == NULL); tal_free(path); path = path_join(ctx, take(tal_strdup(ctx, "foo")), take(tal_strdup(ctx, "/bar"))); ok1(streq(path, "/bar")); ok1(tal_parent(path) == ctx); - ok1(tal_first(ctx) == path && tal_next(ctx, path) == NULL); + ok1(tal_first(ctx) == path && tal_next(path) == NULL && tal_first(path) == NULL); tal_free(path); path = path_join(ctx, take(NULL), "bar");