1 #include <ccan/tal/path/path.h>
2 #include <ccan/tal/path/path.c>
3 #include <ccan/tap/tap.h>
7 char path1[1024], *cwd, *ctx = tal_strdup(NULL, "ctx");
9 /* This is how many tests you plan to run */
12 if (!getcwd(path1, sizeof(path1)))
17 ok1(tal_parent(cwd) == ctx);
20 rmdir("run-cwd-long-long-long-name/bar-long-long-long-long-name");
21 rmdir("run-cwd-long-long-long-name");
22 if (mkdir("run-cwd-long-long-long-name", 0700) != 0)
24 if (mkdir("run-cwd-long-long-long-name/bar-long-long-long-long-name", 0700) != 0)
26 if (chdir("run-cwd-long-long-long-name/bar-long-long-long-long-name") != 0)
31 ok1(tal_parent(cwd) == ctx);
33 "run-cwd-long-long-long-name/bar-long-long-long-long-name"));