sub command_ok
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
+
my $self = shift;
local $ENV{PGPORT} = $self->port;
sub command_fails
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
+
my $self = shift;
local $ENV{PGPORT} = $self->port;
sub command_like
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
+
my $self = shift;
local $ENV{PGPORT} = $self->port;
sub command_checks_all
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
+
my $self = shift;
local $ENV{PGPORT} = $self->port;
sub issues_sql_like
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
+
my ($self, $cmd, $expected_sql, $test_name) = @_;
local $ENV{PGPORT} = $self->port;
#
sub command_ok
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
my ($cmd, $test_name) = @_;
my $result = run_log($cmd);
ok($result, $test_name);
sub command_fails
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
my ($cmd, $test_name) = @_;
my $result = run_log($cmd);
ok(!$result, $test_name);
sub command_exit_is
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
my ($cmd, $expected, $test_name) = @_;
print("# Running: " . join(" ", @{$cmd}) . "\n");
my $h = IPC::Run::start $cmd;
sub program_help_ok
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
my ($cmd) = @_;
my ($stdout, $stderr);
print("# Running: $cmd --help\n");
sub program_version_ok
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
my ($cmd) = @_;
my ($stdout, $stderr);
print("# Running: $cmd --version\n");
sub program_options_handling_ok
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
my ($cmd) = @_;
my ($stdout, $stderr);
print("# Running: $cmd --not-a-valid-option\n");
sub command_like
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
my ($cmd, $expected_stdout, $test_name) = @_;
my ($stdout, $stderr);
print("# Running: " . join(" ", @{$cmd}) . "\n");
sub command_like_safe
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
# Doesn't rely on detecting end of file on the file descriptors,
# which can fail, causing the process to hang, notably on Msys
sub command_fails_like
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
my ($cmd, $expected_stderr, $test_name) = @_;
my ($stdout, $stderr);
print("# Running: " . join(" ", @{$cmd}) . "\n");
# - test_name: name of test
sub command_checks_all
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
+
my ($cmd, $expected_ret, $out, $err, $test_name) = @_;
# run command
# The second argument is a complementary connection string.
sub test_connect_ok
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
+
my ($common_connstr, $connstr, $test_name) = @_;
my $cmd = [
sub test_connect_fails
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
+
my ($common_connstr, $connstr, $expected_stderr, $test_name) = @_;
my $cmd = [