LCOV - code coverage report
Current view: top level - test - test-ask-password-api.c (source / functions) Hit Total Coverage
Test: systemd_full.info Lines: 0 11 0.0 %
Date: 2019-08-23 13:36:53 Functions: 0 2 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 6 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* SPDX-License-Identifier: LGPL-2.1+ */
       2                 :            : 
       3                 :            : #include "alloc-util.h"
       4                 :            : #include "ask-password-api.h"
       5                 :            : #include "log.h"
       6                 :            : #include "strv.h"
       7                 :            : 
       8                 :          0 : static void ask_password(void) {
       9                 :            :         int r;
      10                 :          0 :         _cleanup_strv_free_ char **ret = NULL;
      11                 :            : 
      12                 :          0 :         r = ask_password_tty(-1, "hello?", "da key", 0, 0, NULL, &ret);
      13         [ #  # ]:          0 :         assert(r >= 0);
      14         [ #  # ]:          0 :         assert(strv_length(ret) == 1);
      15                 :            : 
      16         [ #  # ]:          0 :         log_info("Got %s", *ret);
      17                 :          0 : }
      18                 :            : 
      19                 :          0 : int main(int argc, char **argv) {
      20                 :          0 :         log_parse_environment();
      21                 :            : 
      22                 :          0 :         ask_password();
      23                 :          0 :         return EXIT_SUCCESS;
      24                 :            : }

Generated by: LCOV version 1.14