From d57d29c56e70ed1d566848d1912ea7e181414835 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Wed, 12 Feb 2025 12:22:29 +1100 Subject: [PATCH v1] Help prevent users from calling the wrong function --- src/test/perl/PostgreSQL/Test/Utils.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/perl/PostgreSQL/Test/Utils.pm b/src/test/perl/PostgreSQL/Test/Utils.pm index efe0321..fd14a74 100644 --- a/src/test/perl/PostgreSQL/Test/Utils.pm +++ b/src/test/perl/PostgreSQL/Test/Utils.pm @@ -878,7 +878,9 @@ Check that the command fails (when run via C). sub command_fails { local $Test::Builder::Level = $Test::Builder::Level + 1; - my ($cmd, $test_name) = @_; + my ($cmd, $test_name, $extra) = @_; + $extra //= ''; # default '' if undef + is($extra, '', "Unexpected number of parameters. Did you mean to use command_fails_like?"); my $result = run_log($cmd); ok(!$result, $test_name); return; -- 1.8.3.1