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

Commit a89fa00

Browse files
committed
Apply pg_dump test cleanups to test_pg_dump as well
Apply the changes from 41a2844 to the test_pg_dump module as well. Here, we just apply the new test consistency checks, but we don't need to fix any existing tests. Discussion: https://www.postgresql.org/message-id/flat/1f8cb371-e84e-434e-0367-6b716fb16fa1@eisentraut.org
1 parent d859fdb commit a89fa00

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/test/modules/test_pg_dump/t/001_base.pl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,22 @@
857857
858858
foreach my $test (sort keys %tests)
859859
{
860+
# Check for proper test definitions
861+
#
862+
# There should be a "like" list, even if it is empty. (This
863+
# makes the test more self-documenting.)
864+
if (!defined($tests{$test}->{like}))
865+
{
866+
die "missing \"like\" in test \"$test\"";
867+
}
868+
# Check for useless entries in "unlike" list. Runs that are
869+
# not listed in "like" don't need to be excluded in "unlike".
870+
if ($tests{$test}->{unlike}->{$test_key}
871+
&& !defined($tests{$test}->{like}->{$test_key}))
872+
{
873+
die "useless \"unlike\" entry \"$test_key\" in test \"$test\"";
874+
}
875+
860876
# Run the test listed as a like, unless it is specifically noted
861877
# as an unlike (generally due to an explicit exclusion or similar).
862878
if ($tests{$test}->{like}->{$test_key}

0 commit comments

Comments
 (0)