Commit 64725728 authored by Michael Paquier's avatar Michael Paquier

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
parent dad75eb4
......@@ -4,7 +4,7 @@ use warnings;
use Config;
use PostgresNode;
use TestLib;
use Test::More tests => 78;
use Test::More tests => 82;
my $tempdir = TestLib::tempdir;
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/,
'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(
[ 'pg_restore', '--if-exists', '-f -' ],
qr/\Qpg_restore: error: option --if-exists requires option -c\/--clean\E/,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment