LCOV - differential code coverage report
Current view: top level - src/interfaces/ecpg/test/connect - test1.pgc (source / functions) Coverage Total Hit UBC
Current: Differential Code Coverage 16@8cea358b128 vs 17@8cea358b128 Lines: 0.0 % 26 0 26
Current Date: 2024-04-14 14:21:10 Functions: 0.0 % 1 0 1
Baseline: 16@8cea358b128 Branches: - 0 0
Baseline Date: 2024-04-14 14:21:09 Line coverage date bins:
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed (240..) days: 0.0 % 26 0 26
Function coverage date bins:
(240..) days: 0.0 % 1 0 1

 Age         Owner                    Branch data    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
 6465 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                 :                : 
 2828 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';
 6465 meskes@postgresql.or       24                 :              0 :     exec sql disconnect;  /* <-- "main" not specified */
                                 25                 :                : 
 2828 tgl@sss.pgh.pa.us          26                 :              0 :     exec sql connect to ecpg2_regression@localhost as main;
 6465 meskes@postgresql.or       27                 :              0 :     exec sql disconnect main;
                                 28                 :                : 
 2828 tgl@sss.pgh.pa.us          29                 :              0 :     exec sql connect to @localhost as main user regress_ecpg_user2;
 6438 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                 :                : 
 2828 tgl@sss.pgh.pa.us          35                 :              0 :     exec sql connect to tcp:postgresql://localhost/ecpg2_regression user regress_ecpg_user1 identified by connectpw;
 6438 meskes@postgresql.or       36                 :              0 :     exec sql disconnect;
                                 37                 :                : 
 2828 tgl@sss.pgh.pa.us          38                 :              0 :     exec sql connect to tcp:postgresql://localhost/ user regress_ecpg_user2;
 6465 meskes@postgresql.or       39                 :              0 :     exec sql disconnect;
                                 40                 :                : 
                                 41                 :              0 :     strcpy(pw, "connectpw");
 2828 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;
 6465 meskes@postgresql.or       44                 :              0 :     exec sql disconnect;
                                 45                 :                : 
 2828 tgl@sss.pgh.pa.us          46                 :              0 :     exec sql connect to unix:postgresql://localhost/ecpg2_regression user regress_ecpg_user1 using "connectpw";
 6465 meskes@postgresql.or       47                 :              0 :     exec sql disconnect;
                                 48                 :                : 
 1349 tgl@sss.pgh.pa.us          49                 :              0 :     exec sql connect to unix:postgresql://localhost/ecpg2_regression?connect_timeout=180 user regress_ecpg_user1;
 6440 meskes@postgresql.or       50                 :              0 :     exec sql disconnect;
                                 51                 :                : 
                                 52                 :                :     /* wrong db */
 1772 noah@leadboat.com          53                 :              0 :     exec sql connect to tcp:postgresql://localhost/nonexistent user regress_ecpg_user1 identified by connectpw;
 6465 meskes@postgresql.or       54                 :              0 :     exec sql disconnect;
                                 55                 :                : 
                                 56                 :                :     /* wrong port */
 2346 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 */
 2828 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                 :                : 
 2432 peter_e@gmx.net            64                 :              0 :     return 0;
                                 65                 :                : }
        

Generated by: LCOV version 2.1-beta2-3-g6141622