LCOV - differential code coverage report
Current view: top level - src/interfaces/ecpg/test/connect - test1.pgc (source / functions) Coverage Total Hit UBC
Current: c70b6db34ffeab48beef1fb4ce61bcad3772b8dd vs 06473f5a344df8c9594ead90a609b86f6724cff8 Lines: 0.0 % 26 0 26
Current Date: 2025-09-06 07:49:51 +0900 Functions: 0.0 % 1 0 1
Baseline: lcov-20250907-010129-baseline Line coverage date bins:
Baseline Date: 2025-09-05 08:21:35 +0100 (360..) days: 0.0 % 26 0 26
Legend: Lines:     hit not hit Function coverage date bins:
(360..) days: 0.0 % 1 0 1

 Age         Owner                  TLA  Line data    Source code
                                  1                 : /*
                                  2                 :  * this file tests all sorts of connecting to one single database.
                                  3                 :  */
                                  4                 : 
                                  5                 : #include <stdlib.h>
                                  6                 : #include <string.h>
                                  7                 : #include <stdlib.h>
                                  8                 : #include <stdio.h>
                                  9                 : 
                                 10                 : /* do not include regression.h */
                                 11                 : 
                                 12                 : int
 6976 meskes@postgresql.or       13 UBC           0 : main(void)
                                 14                 : {
                                 15                 : exec sql begin declare section;
                                 16                 :     char db[200];
                                 17                 :     char pw[200];
                                 18                 : exec sql end declare section;
                                 19                 : 
                                 20               0 :     ECPGdebug(1, stderr);
                                 21                 : 
 3339 tgl@sss.pgh.pa.us          22               0 :     exec sql connect to ecpg2_regression as main;
                                 23               0 :     exec sql alter user regress_ecpg_user1 ENCRYPTED PASSWORD 'connectpw';
 6976 meskes@postgresql.or       24               0 :     exec sql disconnect;  /* <-- "main" not specified */
                                 25                 : 
 3339 tgl@sss.pgh.pa.us          26               0 :     exec sql connect to ecpg2_regression@localhost as main;
 6976 meskes@postgresql.or       27               0 :     exec sql disconnect main;
                                 28                 : 
 3339 tgl@sss.pgh.pa.us          29               0 :     exec sql connect to @localhost as main user regress_ecpg_user2;
 6949 meskes@postgresql.or       30               0 :     exec sql disconnect main;
                                 31                 : 
                                 32                 :     /* exec sql connect to :@TEMP_PORT@ as main user regress_ecpg_user2;
                                 33                 :     exec sql disconnect main; */
                                 34                 : 
 3339 tgl@sss.pgh.pa.us          35               0 :     exec sql connect to tcp:postgresql://localhost/ecpg2_regression user regress_ecpg_user1 identified by connectpw;
 6949 meskes@postgresql.or       36               0 :     exec sql disconnect;
                                 37                 : 
 3339 tgl@sss.pgh.pa.us          38               0 :     exec sql connect to tcp:postgresql://localhost/ user regress_ecpg_user2;
 6976 meskes@postgresql.or       39               0 :     exec sql disconnect;
                                 40                 : 
                                 41               0 :     strcpy(pw, "connectpw");
 3339 tgl@sss.pgh.pa.us          42               0 :     strcpy(db, "tcp:postgresql://localhost/ecpg2_regression");
                                 43               0 :     exec sql connect to :db user regress_ecpg_user1 using :pw;
 6976 meskes@postgresql.or       44               0 :     exec sql disconnect;
                                 45                 : 
 3339 tgl@sss.pgh.pa.us          46               0 :     exec sql connect to unix:postgresql://localhost/ecpg2_regression user regress_ecpg_user1 using "connectpw";
 6976 meskes@postgresql.or       47               0 :     exec sql disconnect;
                                 48                 : 
 1860 tgl@sss.pgh.pa.us          49               0 :     exec sql connect to unix:postgresql://localhost/ecpg2_regression?connect_timeout=180 user regress_ecpg_user1;
 6951 meskes@postgresql.or       50               0 :     exec sql disconnect;
                                 51                 : 
                                 52                 :     /* wrong db */
 2283 noah@leadboat.com          53               0 :     exec sql connect to tcp:postgresql://localhost/nonexistent user regress_ecpg_user1 identified by connectpw;
 6976 meskes@postgresql.or       54               0 :     exec sql disconnect;
                                 55                 : 
                                 56                 :     /* wrong port */
 2857 noah@leadboat.com          57               0 :     exec sql connect to tcp:postgresql://127.0.0.1:20/ecpg2_regression user regress_ecpg_user1 identified by connectpw;
                                 58                 :     /* no disconnect necessary */
                                 59                 : 
                                 60                 :     /* wrong password */
 3339 tgl@sss.pgh.pa.us          61               0 :     exec sql connect to unix:postgresql://localhost/ecpg2_regression user regress_ecpg_user1 identified by "wrongpw";
                                 62                 :     /* no disconnect necessary */
                                 63                 : 
 2943 peter_e@gmx.net            64               0 :     return 0;
                                 65                 : }
        

Generated by: LCOV version 2.4-beta