summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-16 23:08:23 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-16 23:08:23 -0400
commit24737c291738313fd67924172988a8986f60e958 (patch)
tree47ae0c571e452ffda40ee041105dfd44ce255e7f /src/test
parent3ae5990c6ed54f5d4acec12c2e9e40d110c72230 (diff)
install: allow paths like LookupPath.generator to be NULL
Fixes #3047.
Diffstat (limited to 'src/test')
-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 7ce2695c5c..5d77e2959c 100644
--- a/src/test/test-path-util.c
+++ b/src/test/test-path-util.c
@@ -96,6 +96,12 @@ static void test_path(void) {
assert_se(PATH_IN_SET("/bin", "/foo/bar", "/bin"));
assert_se(PATH_IN_SET("/", "/", "/", "/foo/bar"));
assert_se(!PATH_IN_SET("/", "/abc", "/def"));
+
+ assert_se(path_equal_ptr(NULL, NULL));
+ assert_se(path_equal_ptr("/a", "/a"));
+ assert_se(!path_equal_ptr("/a", "/b"));
+ assert_se(!path_equal_ptr("/a", NULL));
+ assert_se(!path_equal_ptr(NULL, "/a"));
}
static void test_find_binary(const char *self) {