From da33abaf8bbfaee9e713ac54f3355186650df952 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Wed, 26 Sep 2012 11:21:13 -0600 Subject: [PATCH] porting/podcheck.t: Add test for removed files If a file is removed from Perl that is in podcheck's data base, it should be removed from the db at that time. This adds a check to make sure that happens. --- t/porting/podcheck.t | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/t/porting/podcheck.t b/t/porting/podcheck.t index cc71bda..4cea599 100644 --- a/t/porting/podcheck.t +++ b/t/porting/podcheck.t @@ -458,7 +458,8 @@ sub suppressed { sub plan { my %plan = @_; - $planned = $plan{tests}; + $planned = $plan{tests} + 1; # +1 for final test that files haven't + # been removed print "1..$planned\n"; return; } @@ -1841,9 +1842,19 @@ foreach my $filename (@files) { note(join "", @diagnostics, "See end of this test output for your options on silencing this"); } + + delete $known_problems{$canonical}; } } +if (! ok (keys %known_problems == 0, "The known problems data base includes no references to non-existent files")) { + note("The following files were not found: " + . join ", ", keys %known_problems); + note("They will automatically be removed from the db the next time"); + note(" cd t; ./perl -I../lib porting/podcheck.t --regen"); + note("is run"); +} + my $how_to = <