aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/t/002_api.pl
blob: 3202c87ebe79dd3d399ad8f669a1ef1882f1a7e1 (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-2025, PostgreSQL Global Development Group
use strict;
use warnings FATAL => 'all';

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();