LCOV - differential code coverage report
Current view: top level - src/interfaces/libpq/test - libpq_testclient.c (source / functions) Coverage Total Hit UBC CBC
Current: Differential Code Coverage HEAD vs 15 Lines: 75.0 % 12 9 3 9
Current Date: 2023-04-08 17:13:01 Functions: 100.0 % 2 2 2
Baseline: 15 Line coverage date bins:
Baseline Date: 2023-04-08 15:09:40 (240..) days: 75.0 % 12 9 3 9
Legend: Lines: hit not hit Function coverage date bins:
(240..) days: 100.0 % 2 2 2

 Age         Owner                  TLA  Line data    Source code
                                  1                 : /*
                                  2                 :  * libpq_testclient.c
                                  3                 :  *      A test program for the libpq public API
                                  4                 :  *
                                  5                 :  * Copyright (c) 2022-2023, PostgreSQL Global Development Group
                                  6                 :  *
                                  7                 :  * IDENTIFICATION
                                  8                 :  *      src/interfaces/libpq/test/libpq_testclient.c
                                  9                 :  */
                                 10                 : 
                                 11                 : #include "postgres_fe.h"
                                 12                 : 
                                 13                 : #include "libpq-fe.h"
                                 14                 : 
                                 15                 : static void
  376 dgustafsson                16 CBC           1 : print_ssl_library()
                                 17                 : {
                                 18               1 :     const char *lib = PQsslAttribute(NULL, "library");
                                 19                 : 
                                 20               1 :     if (!lib)
  376 dgustafsson                21 UBC           0 :         fprintf(stderr, "SSL is not enabled\n");
                                 22                 :     else
  376 dgustafsson                23 CBC           1 :         printf("%s\n", lib);
                                 24               1 : }
                                 25                 : 
                                 26                 : int
                                 27               1 : main(int argc, char *argv[])
                                 28                 : {
                                 29               1 :     if ((argc > 1) && !strcmp(argv[1], "--ssl"))
                                 30                 :     {
                                 31               1 :         print_ssl_library();
                                 32               1 :         return 0;
                                 33                 :     }
                                 34                 : 
  376 dgustafsson                35 UBC           0 :     printf("currently only --ssl is supported\n");
                                 36               0 :     return 1;
                                 37                 : }
        

Generated by: LCOV version v1.16-55-g56c0a2a