LCOV - code coverage report
Current view: top level - test - test-os-util.c (source / functions) Hit Total Coverage
Test: main_coverage.info Lines: 9 9 100.0 %
Date: 2019-08-22 15:41:25 Functions: 2 2 100.0 %

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

Generated by: LCOV version 1.14