summaryrefslogtreecommitdiff
path: root/ccan/tal/path/test/run-is_abs.c
blob: 8cb0a1d825e9a8deabb02bedd857449b1b535b91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <ccan/tal/path/path.h>
#include <ccan/tal/path/path.c>
#include <ccan/tap/tap.h>

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();
}