From a20d09fce8470caac5318640d361c1373c28e08c Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sun, 15 Jun 2014 21:57:19 -0600 Subject: [PATCH 1/1] lib/locale.t: Add debugging statement This prints only during debugging the percentage of locales that fail tests that exceed the permissible failure rate.. --- lib/locale.t | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/locale.t b/lib/locale.t index 1463579..1f496f5 100644 --- a/lib/locale.t +++ b/lib/locale.t @@ -2150,12 +2150,20 @@ foreach $test_num ($first_locales_test_number..$final_locales_test_number) { my $percent_fail = (int(.5 + (1000 * scalar(keys $Problem{$test_num}) / scalar(@Locale)))) / 10; - if (! $debug && $percent_fail < $acceptable_failure_percentage) - { - $test_names{$test_num} .= 'TODO'; - print "# ", 100 - $percent_fail, "% of locales pass the following test, so it is likely that the failures\n"; - print "# are errors in the locale definitions. The test is marked TODO, as the\n"; - print "# problem is not likely to be Perl's\n"; + if ($percent_fail < $acceptable_failure_percentage) { + if (! $debug) { + $test_names{$test_num} .= 'TODO'; + print "# ", 100 - $percent_fail, "% of locales pass the following test, so it is likely that the failures\n"; + print "# are errors in the locale definitions. The test is marked TODO, as the\n"; + print "# problem is not likely to be Perl's\n"; + } + } + elsif ($debug) { + print "# $percent_fail% of locales (", + scalar(keys $Problem{$test_num}), + " of ", + scalar(@Locale), + ") fail the following test\n"; } } print "#\n"; -- 1.8.3.1