In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/67fc5dca3c7690b8ce5606f5630383473174d823?hp=c45df5a16bb5a26a06275cc63f2c3e6b1d708184>
- Log ----------------------------------------------------------------- commit 67fc5dca3c7690b8ce5606f5630383473174d823 Author: David Leadbeater <[email protected]> Date: Tue Mar 8 16:48:24 2011 -0800 In fold_grind.t only report OK for each charset/target combination This brings the number of tests down significantly and due to the reduced amount of printing the runtime too. Failing tests are still reported and a complete run can be enabled by setting $ENV{PERL_DEBUG_FULL_TEST} to a true value. ----------------------------------------------------------------------- Summary of changes: t/re/fold_grind.t | 25 +++++++++++++++++++++++-- 1 files changed, 23 insertions(+), 2 deletions(-) diff --git a/t/re/fold_grind.t b/t/re/fold_grind.t index 5a8a7b4..0a848f9 100644 --- a/t/re/fold_grind.t +++ b/t/re/fold_grind.t @@ -46,6 +46,11 @@ my $Unicode = 3; # set. my $skip_apparently_redundant = ! $ENV{PERL_RUN_SLOW_TESTS}; +# Additionally parts of this test run a lot of subtests, outputting the +# resulting TAP can be expensive so the tests are summarised internally. The +# PERL_DEBUG_FULL_TEST environment variable can be set to produce the full +# output for debugging purposes. + sub range_type { my $ord = shift; @@ -418,6 +423,9 @@ foreach my $test (sort { numerically } keys %tests) { # XXX Doesn't currently test multi-char folds in pattern next if @pattern != 1; + my $okays = 0; + my $this_iteration = 0; + foreach my $bracketed (0, 1) { # Put rhs in [...], or not foreach my $inverted (0,1) { next if $inverted && ! $bracketed; # inversion only valid in [^...] @@ -542,8 +550,15 @@ foreach my $test (sort { numerically } keys %tests) { utf8::upgrade($p) if length($upgrade_pattern); my $res = $op ? ($c =~ $p): ($c !~ $p); - $count++; - ok($res, $desc); + if (!$res || $ENV{PERL_DEBUG_FULL_TEST}) { + # Failed or debug; output the result + $count++; + ok($res, $desc); + } else { + # Just count the test as passed + $okays++; + } + $this_iteration++; } } } @@ -552,6 +567,12 @@ foreach my $test (sort { numerically } keys %tests) { } } } + + unless($ENV{PERL_DEBUG_FULL_TEST}) { + $count++; + is $okays, $this_iteration, "Subtests okay for " + . "charset=$charset, utf8_pattern=$utf8_pattern"; + } } } } -- Perl5 Master Repository
