Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Consolidate tens of thousands of redundant TAP lines
  • Loading branch information
rwstauner committed May 14, 2014
1 parent 65fe2a6 commit 1d28c66
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion t/sitemap.t
Expand Up @@ -65,9 +65,18 @@ foreach my $test (@tests) {

# Check that each of the urls has the right pattern.

note 'Checking urls';
my $url_tests;
foreach my $url ( @{ $xml->{url} } ) {
like( $url, $test->{pattern}, 'URL matches' );

# Test that the url matches
# but only print a TAP line for the first test or if there's a failure.
# ~30,000 tests is a lot of output to sift through.
if ( !$url_tests++ || $url !~ $test->{pattern} ) {
like( $url, $test->{pattern}, 'URL matches' );
}
}
ok( $url_tests, "Tested $url_tests urls" );
}

done_testing();

0 comments on commit 1d28c66

Please sign in to comment.