chiark / gitweb /
os-util: add helpers for finding /etc/os-release
[elogind.git] / src / test / test-os-util.c
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2
3 //#include <errno.h>
4
5 //#include "log.h"
6 //#include "os-util.h"
7
8 static void test_path_is_os_tree(void) {
9         assert_se(path_is_os_tree("/") > 0);
10         assert_se(path_is_os_tree("/etc") == 0);
11         assert_se(path_is_os_tree("/idontexist") == -ENOENT);
12 }
13
14 int main(int argc, char *argv[]) {
15         log_set_max_level(LOG_DEBUG);
16         log_parse_environment();
17         log_open();
18
19         test_path_is_os_tree();
20
21         return 0;
22 }