summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gustafsson2023-04-08 21:32:11 +0000
committerDaniel Gustafsson2023-04-08 21:32:11 +0000
commit6ff2e8cdd410f70057cfa6259ad395c1119aeb32 (patch)
tree8d99cbeff43a47a5c2190c968269697bf9414fbb
parent980e8879f54a7a00ca6a5bae2fe9486c87ef3e8e (diff)
Simplify version check for SKIP clause
Checking for the required versions of IO::Pty as well as IPC::Run can be achieved with a single eval call, and by using the VERSION function the comparison is guaranteed to follow the same rules as calling 'use' on the module with a version. Reported-by: Andrew Dunstan <[email protected]> Discussion: https://postgr.es/m/[email protected]
-rw-r--r--src/test/authentication/t/001_password.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/authentication/t/001_password.pl b/src/test/authentication/t/001_password.pl
index 10ebe014d6..d7362a4d3e 100644
--- a/src/test/authentication/t/001_password.pl
+++ b/src/test/authentication/t/001_password.pl
@@ -107,7 +107,7 @@ is($res, 'SCRAM-SHA-256$1024:', 'scram_iterations in server side ROLE');
SKIP:
{
skip "IO::Pty and IPC::Run >= 0.98 required", 1 unless
- (eval { require IO::Pty; } && eval { $IPC::Run::VERSION >= '0.98' });
+ eval { require IO::Pty; IPC::Run->VERSION('0.98'); };
# Alter the password on the created role using \password in psql to ensure
# that clientside password changes use the scram_iterations value when