summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/t/002_api.pl
blob: 8b43a984fbce8c562c90b5534ae3330d9366c36a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Copyright (c) 2022-2023, 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();