LCOV - code coverage report
Current view: top level - login - test-login-shared.c (source / functions) Hit Total Coverage
Test: systemd_full.info Lines: 12 12 100.0 %
Date: 2019-08-23 13:36:53 Functions: 2 2 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 5 10 50.0 %

           Branch data     Line data    Source code
       1                 :            : /* SPDX-License-Identifier: LGPL-2.1+ */
       2                 :            : 
       3                 :            : #include "login-util.h"
       4                 :            : #include "macro.h"
       5                 :            : 
       6                 :          4 : static void test_session_id_valid(void) {
       7         [ -  + ]:          4 :         assert_se(session_id_valid("c1"));
       8         [ -  + ]:          4 :         assert_se(session_id_valid("1234"));
       9                 :            : 
      10         [ -  + ]:          4 :         assert_se(!session_id_valid("1-2"));
      11         [ -  + ]:          4 :         assert_se(!session_id_valid(""));
      12         [ -  + ]:          4 :         assert_se(!session_id_valid("\tid"));
      13                 :          4 : }
      14                 :            : 
      15                 :          4 : int main(int argc, char* argv[]) {
      16                 :          4 :         log_parse_environment();
      17                 :          4 :         log_open();
      18                 :            : 
      19                 :          4 :         test_session_id_valid();
      20                 :            : 
      21                 :          4 :         return 0;
      22                 :            : }

Generated by: LCOV version 1.14