X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftal%2Fpath%2Ftest%2Frun-is_abs.c;fp=ccan%2Ftal%2Fpath%2Ftest%2Frun-is_abs.c;h=8cb0a1d825e9a8deabb02bedd857449b1b535b91;hb=892f59bdc1830443f87ad3aaeddaab2eeefb5937;hp=0000000000000000000000000000000000000000;hpb=1322fd3377cc817720f7552a80d56dba447bcfea;p=ccan diff --git a/ccan/tal/path/test/run-is_abs.c b/ccan/tal/path/test/run-is_abs.c new file mode 100644 index 00000000..8cb0a1d8 --- /dev/null +++ b/ccan/tal/path/test/run-is_abs.c @@ -0,0 +1,16 @@ +#include +#include +#include + +int main(void) +{ + plan_tests(5); + + ok1(path_is_abs(PATH_SEP_STR "foo")); + ok1(!path_is_abs("foo")); + ok1(!path_is_abs("foo" PATH_SEP_STR)); + + ok1(path_is_abs(PATH_SEP_STR "foo" PATH_SEP_STR)); + ok1(path_is_abs(PATH_SEP_STR ".")); + return exit_status(); +}