]>
Commit | Line | Data |
---|---|---|
d58ad743 LP |
1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
2 | ||
3 | #include <errno.h> | |
4 | ||
5 | #include "log.h" | |
6 | #include "os-util.h" | |
6d7c4033 | 7 | #include "tests.h" |
d58ad743 LP |
8 | |
9 | static void test_path_is_os_tree(void) { | |
10 | assert_se(path_is_os_tree("/") > 0); | |
11 | assert_se(path_is_os_tree("/etc") == 0); | |
12 | assert_se(path_is_os_tree("/idontexist") == -ENOENT); | |
13 | } | |
14 | ||
15 | int main(int argc, char *argv[]) { | |
6d7c4033 | 16 | test_setup_logging(LOG_DEBUG); |
d58ad743 LP |
17 | |
18 | test_path_is_os_tree(); | |
19 | ||
20 | return 0; | |
21 | } |