You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
|
|
# Copyright (c) 2021, PostgreSQL Global Development Group
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
|
|
|
use Config;
|
|
|
|
use PostgreSQL::Test::Utils;
|
|
|
|
use Test::More tests => 12;
|
|
|
|
|
|
|
|
#########################################
|
|
|
|
# Basic checks
|
|
|
|
|
|
|
|
program_help_ok('pg_test_timing');
|
|
|
|
program_version_ok('pg_test_timing');
|
|
|
|
program_options_handling_ok('pg_test_timing');
|
|
|
|
|
|
|
|
#########################################
|
|
|
|
# Test invalid option combinations
|
|
|
|
|
|
|
|
command_fails_like(
|
|
|
|
[ 'pg_test_timing', '--duration', 'a' ],
|
|
|
|
qr/\Qpg_test_timing: invalid argument for option --duration\E/,
|
|
|
|
'pg_test_timing: invalid argument for option --duration');
|
|
|
|
command_fails_like(
|
|
|
|
[ 'pg_test_timing', '--duration', '0' ],
|
|
|
|
qr/\Qpg_test_timing: --duration must be in range 1..4294967295\E/,
|
|
|
|
'pg_test_timing: --duration must be in range');
|