postgres.git / summary / log / commit / refs
commit 1a531f787f89446db51942a67ee37ba5924d521d
Author: Michael Paquier <michael@paquier.xyz>
Date: Tue Sep 08 03:42:09 2026 +0000
pg_resetwal: Add test for -o with negative value
This has been extracted from a larger patch set, for a scenario that I
have managed to break while working on a different change. The case of
-o with a negative value had no coverage.
Author: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/af19kUjwjhaoUTLn@paquier.xyz
src/bin/pg_resetwal/t/001_basic.pl | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/bin/pg_resetwal/t/001_basic.pl b/src/bin/pg_resetwal/t/001_basic.pl
index cff0b6423f3..6af97c0a7d9 100644
--- a/src/bin/pg_resetwal/t/001_basic.pl
+++ b/src/bin/pg_resetwal/t/001_basic.pl
@@ -132,6 +132,10 @@ command_fails_like(
[ 'pg_resetwal', '-o' => 'foo', $node->data_dir ],
qr/error: invalid argument for option -o/,
'fails with incorrect -o option');
+command_fails_like(
+ [ 'pg_resetwal', '-o' => '-1', $node->data_dir ],
+ qr/error: invalid argument for option -o/,
+ 'fails with -o value -1');
command_fails_like(
[ 'pg_resetwal', '-o' => '0', $node->data_dir ],
qr/must not be 0/,