summaryrefslogtreecommitdiff
path: root/src/test/test-path-util.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-16 22:52:06 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-16 22:57:05 -0400
commit3ae5990c6ed54f5d4acec12c2e9e40d110c72230 (patch)
treedc844349409cfc123fb1cfe4b52c01153ef27ee4 /src/test/test-path-util.c
parent9a0a413a195a21888cf926be5595d0efc1eef0fe (diff)
tree-wide: introduce PATH_IN_SET macro
Diffstat (limited to 'src/test/test-path-util.c')
-rw-r--r--src/test/test-path-util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c
index d376dd56c5..7ce2695c5c 100644
--- a/src/test/test-path-util.c
+++ b/src/test/test-path-util.c
@@ -90,6 +90,12 @@ static void test_path(void) {
assert_se(path_equal(path_kill_slashes(p2), "/aaa/./ccc"));
assert_se(path_equal(path_kill_slashes(p3), "/./"));
}
+
+ assert_se(PATH_IN_SET("/bin", "/", "/bin", "/foo"));
+ assert_se(PATH_IN_SET("/bin", "/bin"));
+ assert_se(PATH_IN_SET("/bin", "/foo/bar", "/bin"));
+ assert_se(PATH_IN_SET("/", "/", "/", "/foo/bar"));
+ assert_se(!PATH_IN_SET("/", "/abc", "/def"));
}
static void test_find_binary(const char *self) {