tdbc::postgres

Check-in [a3a8162cb2]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Bring test env var names into alignment with the other TDBC drivers. env() -> ::env()
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tdbcpostgres-stwo
Files: files | file ages | folders
SHA1: a3a8162cb20ea66594337c404dcb611e211d68c4
User & Date: stu 2017-05-20 01:18:07
Context
2017-05-23
18:45
merge tdbcpostres-stwo check-in: cd0223ceea user: stu tags: trunk
2017-05-20
01:18
Bring test env var names into alignment with the other TDBC drivers. env() -> ::env() Closed-Leaf check-in: a3a8162cb2 user: stu tags: tdbcpostgres-stwo
2017-05-17
14:50
Adjust intptr_t macro usage. check-in: 540371aa5e user: stwo tags: tdbcpostgres-stwo
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/tdbcpostgres.test.

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
namespace import -force ::tcltest::*
loadTestedCommands
package require tdbc::postgres

# We need to know the parameters of the Postgre database for testing.

set connFlags {}
if {[info exists env(TDBCPOSTGRES_HOST)]} {
    lappend connFlags -host $env(TDBCPOSTGRES_HOST)
}
if {[info exists env(TDBCPOSTGRES_USER)]} {
    lappend connFlags -user $env(TDBCPOSTGRES_USER)
}
if {[info exists env(TDBCPOSTGRES_PASSWD)]} {
    lappend connFlags -password $env(TDBCPOSTGRES_PASSWD)
}
if {[info exists env(TDBCPOSTGRES_DB)]} {
    lappend connFlags -db $env(TDBCPOSTGRES_DB)
    tcltest::testConstraint connect 1
} else {
    tcltest::testConstraint connect 0
}
if {[info exists env(TDBCPOSTGRES_PORT)]} {
    lappend connFlags -port $env(TDBCPOSTGRES_PORT)
}

#------------------------------------------------------------------------------
test tdbc::postgres-1.1 {create a connection, wrong # args} {*}{
    -body {
	tdbc::postgres::connection create
    }






|
|

|
|

|
|

|
|




|
|







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
namespace import -force ::tcltest::*
loadTestedCommands
package require tdbc::postgres

# We need to know the parameters of the Postgre database for testing.

set connFlags {}
if {[info exists ::env(TDBCPOSTGRES_TEST_HOST)]} {
    lappend connFlags -host $::env(TDBCPOSTGRES_TEST_HOST)
}
if {[info exists ::env(TDBCPOSTGRES_TEST_USER)]} {
    lappend connFlags -user $::env(TDBCPOSTGRES_TEST_USER)
}
if {[info exists ::env(TDBCPOSTGRES_TEST_PASSWD)]} {
    lappend connFlags -password $::env(TDBCPOSTGRES_TEST_PASSWD)
}
if {[info exists ::env(TDBCPOSTGRES_TEST_DB)]} {
    lappend connFlags -db $::env(TDBCPOSTGRES_TEST_DB)
    tcltest::testConstraint connect 1
} else {
    tcltest::testConstraint connect 0
}
if {[info exists ::env(TDBCPOSTGRES_TEST_PORT)]} {
    lappend connFlags -port $::env(TDBCPOSTGRES_TEST_PORT)
}

#------------------------------------------------------------------------------
test tdbc::postgres-1.1 {create a connection, wrong # args} {*}{
    -body {
	tdbc::postgres::connection create
    }