1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-18 02:02:55 +03:00
Files
postgres/src/bin/pg_test_fsync/t/001_basic.pl
Bruce Momjian 29275b1d17 Update copyright for 2024
Reported-by: Michael Paquier

Discussion: https://postgr.es/m/ZZKTDPxBBMt3C0J9@paquier.xyz

Backpatch-through: 12
2024-01-03 20:49:05 -05:00

30 lines
828 B
Perl

# Copyright (c) 2021-2024, PostgreSQL Global Development Group
use strict;
use warnings FATAL => 'all';
use PostgreSQL::Test::Utils;
use Test::More;
#########################################
# Basic checks
program_help_ok('pg_test_fsync');
program_version_ok('pg_test_fsync');
program_options_handling_ok('pg_test_fsync');
#########################################
# Test invalid option combinations
command_fails_like(
[ 'pg_test_fsync', '--secs-per-test', 'a' ],
qr/\Qpg_test_fsync: error: invalid argument for option --secs-per-test\E/,
'pg_test_fsync: invalid argument for option --secs-per-test');
command_fails_like(
[ 'pg_test_fsync', '--secs-per-test', '0' ],
qr/\Qpg_test_fsync: error: --secs-per-test must be in range 1..4294967295\E/,
'pg_test_fsync: --secs-per-test must be in range');
done_testing();