Fix condition in pg_dump TAP test
authorTomas Vondra <tomas.vondra@postgresql.org>
Wed, 1 Mar 2023 14:53:51 +0000 (15:53 +0100)
committerTomas Vondra <tomas.vondra@postgresql.org>
Wed, 1 Mar 2023 14:58:25 +0000 (15:58 +0100)
The condition checking compression support was parenthesized
incorrectly after adding lz4, so fix that.

Reported-by: Justin Pryzby
Discussion: https://postgr.es/m/20230227044910.GO1653@telsasoft.com

src/bin/pg_dump/t/002_pg_dump.pl

index 72b19ee6cde4f9ca9cded9d38fd8b816256123b0..187e4b8d07d2a669ab2852f31de868cbc9c4be7f 100644 (file)
@@ -4248,10 +4248,10 @@ foreach my $run (sort keys %pgdump_runs)
        my $test_key = $run;
        my $run_db   = 'postgres';
 
-       # Skip command-level tests for gzip if there is no support for it.
+       # Skip command-level tests for gzip/lz4 if there is no support for it.
        if ($pgdump_runs{$run}->{compile_option} &&
-               ($pgdump_runs{$run}->{compile_option} eq 'gzip' && !$supports_gzip) ||
-               ($pgdump_runs{$run}->{compile_option} eq 'lz4' && !$supports_lz4))
+               (($pgdump_runs{$run}->{compile_option} eq 'gzip' && !$supports_gzip) ||
+               ($pgdump_runs{$run}->{compile_option} eq 'lz4' && !$supports_lz4)))
        {
                note "$run: skipped due to no $pgdump_runs{$run}->{compile_option} support";
                next;