summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2025-10-17 15:25:53 +0000
committerTom Lane2025-10-17 15:25:53 +0000
commita6113dc1dae009a3d9a634d2fcc59d72d1dd7d7b (patch)
treea6c5d3ed5470e719138578e22e777954ad367f6f
parent7d129ba54e7425baf43aa518d417ba3e4e94a443 (diff)
Improve TAP tests by replacing ok() with better Test::More functions
Transpose the changes made by commit fabb33b35 in 002_pg_dump.pl into its recently-created clone 006_pg_dump_compress.pl.
-rw-r--r--src/bin/pg_dump/t/006_pg_dump_compress.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/pg_dump/t/006_pg_dump_compress.pl b/src/bin/pg_dump/t/006_pg_dump_compress.pl
index b429df19a4d..06acb771116 100644
--- a/src/bin/pg_dump/t/006_pg_dump_compress.pl
+++ b/src/bin/pg_dump/t/006_pg_dump_compress.pl
@@ -612,7 +612,8 @@ foreach my $run (sort keys %pgdump_runs)
if (($tests{$test}->{like}->{$test_key} || $tests{$test}->{all_runs})
&& !defined($tests{$test}->{unlike}->{$test_key}))
{
- if (!ok($output_file =~ $tests{$test}->{regexp},
+ if (!like(
+ $output_file, $tests{$test}->{regexp},
"$run: should dump $test"))
{
diag("Review $run results in $tempdir");
@@ -620,7 +621,8 @@ foreach my $run (sort keys %pgdump_runs)
}
else
{
- if (!ok($output_file !~ $tests{$test}->{regexp},
+ if (!unlike(
+ $output_file, $tests{$test}->{regexp},
"$run: should not dump $test"))
{
diag("Review $run results in $tempdir");