17 lines
482 B
Perl
17 lines
482 B
Perl
use v5.36;
|
|
use Test::More;
|
|
|
|
plan skip_all => $@ if !eval { require FU::PG; } && $@ =~ /Unable to load libpq/;
|
|
plan skip_all => 'Please set FU_TEST_DB to a PostgreSQL connection string to run these tests' if !$ENV{FU_TEST_DB};
|
|
|
|
ok !eval { FU::PG->connect("invalid") };
|
|
|
|
ok FU::PG::lib_version() > 100000;
|
|
|
|
my $conn = FU::PG->connect($ENV{FU_TEST_DB});
|
|
|
|
is ref $conn, 'FU::PG::conn';
|
|
ok $conn->server_version() > 100000;
|
|
is $conn->lib_version(), FU::PG::lib_version();
|
|
|
|
done_testing;
|