summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/t/002_api.pl
blob: 8b3355e6dd62e6762a9c175cd90d46b885f3fb7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Copyright (c) 2022, PostgreSQL Global Development Group
use strict;
use warnings;

use PostgreSQL::Test::Utils;
use Test::More;

# Test PQsslAttribute(NULL, "library")
my ($out, $err) = run_command(['libpq_testclient', '--ssl']);

if ($ENV{with_ssl} eq 'openssl')
{
	is($out, 'OpenSSL', 'PQsslAttribute(NULL, "library") returns "OpenSSL"');
}
else
{
	is($err, 'SSL is not enabled', 'PQsslAttribute(NULL, "library") returns NULL');
}

done_testing();