# Since we strip "\.\n" when we search a warning, strip it here as well
$header =~ s/\.?$//;
- my @toks = split( /(%l?[dxX]|%u|%c|%(?:\.\d+)?[fs])/, $header );
+ my @toks = split( /(%l?[dxX]|%[ucp]|%(?:\.\d+)?[fs])/, $header );
if (@toks > 1) {
my $conlen = 0;
for my $i (0..$#toks){
$toks[$i] = $i == $#toks ? '.*' : '.*?';
} elsif( $toks[$i] =~ '%.(\d+)s' ){
$toks[$i] = ".{$1}";
- } elsif( $toks[$i] =~ '^%l*([xX])$' ){
- $toks[$i] = $1 eq 'x' ? '[\da-f]+' : '[\dA-F]+';
+ } elsif( $toks[$i] =~ '^%l*([pxX])$' ){
+ $toks[$i] = $1 eq 'X' ? '[\dA-F]+' : '[\da-f]+';
}
} elsif( length( $toks[$i] ) ){
$toks[$i] = quotemeta $toks[$i];
chdir '..' if -d '../pod' && -d '../t';
@INC = 'lib';
require './t/test.pl';
- plan(18);
+ plan(19);
}
BEGIN {
warn "Unicode surrogate U+C0FFEE is illegal in UTF-8";
like $warning, qr/You had a UTF-16 surrogate/, '%X';
+# Test for %p
+seek STDERR, 0,0;
+$warning = '';
+warn "Slab leaked from cv fadedc0ffee";
+like $warning, qr/bookkeeping of op trees/, '%p';
+
# Strip S<>
seek STDERR, 0,0;
$warning = '';