Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6472572

Browse files
committed
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
1 parent dad75eb commit 6472572

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/bin/pg_dump/t/001_basic.pl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use Config;
55
use PostgresNode;
66
use TestLib;
7-
use Test::More tests => 78;
7+
use Test::More tests => 82;
88

99
my $tempdir = TestLib::tempdir;
1010
my $tempdir_short = TestLib::tempdir_short;
@@ -123,6 +123,16 @@
123123
qr/\Qpg_dump: error: compression level must be in range 0..9\E/,
124124
'pg_dump: compression level must be in range 0..9');
125125

126+
command_fails_like(
127+
[ 'pg_dump', '--extra-float-digits', '-16' ],
128+
qr/\Qpg_dump: error: extra_float_digits must be in range -15..3\E/,
129+
'pg_dump: extra_float_digits must be in range -15..3');
130+
131+
command_fails_like(
132+
[ 'pg_dump', '--rows-per-insert', '0' ],
133+
qr/\Qpg_dump: error: rows-per-insert must be in range 1..2147483647\E/,
134+
'pg_dump: rows-per-insert must be in range 1..2147483647');
135+
126136
command_fails_like(
127137
[ 'pg_restore', '--if-exists', '-f -' ],
128138
qr/\Qpg_restore: error: option --if-exists requires option -c\/--clean\E/,

0 commit comments

Comments
 (0)