Skip to content

Commit

Permalink
XXX temp: lib/locale.t: debug
Browse files Browse the repository at this point in the history
  • Loading branch information
khwilliamson committed Apr 20, 2021
1 parent 362932e commit c06c4c2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/locale.t
Expand Up @@ -57,6 +57,10 @@ use feature 'fc';

# =1 adds debugging output; =2 increases the verbosity somewhat
our $debug = $ENV{PERL_DEBUG_FULL_TEST} // 0;
if ($^O =~ /cygwin | darwin /xi) {
$debug = 1 ;
$^D = 0x04000000|0x00100000;# if $^O eq 'cygwin';
}

# Certain tests have been shown to be problematical for a few locales. Don't
# fail them unless at least this percentage of the tested locales fail.
Expand Down Expand Up @@ -134,14 +138,17 @@ sub ok {
print "ok " . ++$test_num;
print " $message";
print "\n";
debug __FILE__ . ": ", __LINE__ . ": ok=$result $test_num $message" if $debug;
return ($result) ? 1 : 0;
}

sub skip {
debug __FILE__ . ": ", __LINE__ . ": skip $_[0]" if $debug;
return ok 1, "skipped: " . shift;
}

sub fail {
debug __FILE__ . ": ", __LINE__ . ": fail $_[0]" if $debug;
return ok 0, shift;
}

Expand Down

0 comments on commit c06c4c2

Please sign in to comment.