mirror of
https://github.com/postgres/postgres.git
synced 2025-05-12 16:21:30 +03:00
Add more TAP tests for pg_dump options with range checks
This adds two tests for --extra-float-digits and --rows-per-insert, similar to what exists for --compress. Author: Dong Wook Lee Discussion: https://postgr.es/m/CAAcByaJsgrB-qc-ALb0mALprRGLAdmcBap7SZxO4kCAU-JEHcQ@mail.gmail.com
This commit is contained in:
parent
dad75eb4a8
commit
64725728e7
@ -4,7 +4,7 @@ use warnings;
|
|||||||
use Config;
|
use Config;
|
||||||
use PostgresNode;
|
use PostgresNode;
|
||||||
use TestLib;
|
use TestLib;
|
||||||
use Test::More tests => 78;
|
use Test::More tests => 82;
|
||||||
|
|
||||||
my $tempdir = TestLib::tempdir;
|
my $tempdir = TestLib::tempdir;
|
||||||
my $tempdir_short = TestLib::tempdir_short;
|
my $tempdir_short = TestLib::tempdir_short;
|
||||||
@ -123,6 +123,16 @@ command_fails_like(
|
|||||||
qr/\Qpg_dump: error: compression level must be in range 0..9\E/,
|
qr/\Qpg_dump: error: compression level must be in range 0..9\E/,
|
||||||
'pg_dump: compression level must be in range 0..9');
|
'pg_dump: compression level must be in range 0..9');
|
||||||
|
|
||||||
|
command_fails_like(
|
||||||
|
[ 'pg_dump', '--extra-float-digits', '-16' ],
|
||||||
|
qr/\Qpg_dump: error: extra_float_digits must be in range -15..3\E/,
|
||||||
|
'pg_dump: extra_float_digits must be in range -15..3');
|
||||||
|
|
||||||
|
command_fails_like(
|
||||||
|
[ 'pg_dump', '--rows-per-insert', '0' ],
|
||||||
|
qr/\Qpg_dump: error: rows-per-insert must be in range 1..2147483647\E/,
|
||||||
|
'pg_dump: rows-per-insert must be in range 1..2147483647');
|
||||||
|
|
||||||
command_fails_like(
|
command_fails_like(
|
||||||
[ 'pg_restore', '--if-exists', '-f -' ],
|
[ 'pg_restore', '--if-exists', '-f -' ],
|
||||||
qr/\Qpg_restore: error: option --if-exists requires option -c\/--clean\E/,
|
qr/\Qpg_restore: error: option --if-exists requires option -c\/--clean\E/,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user