Skip Menu |
Report information
Id: 133713
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: ppisar <ppisar [at] redhat.com>
Cc:
AdminCc:

Operating System: (no value)
PatchStatus: (no value)
Severity: low
Type: unknown
Perl Version: (no value)
Fixed In: (no value)



To: perlbug [...] perl.org
From: Petr Písař <ppisar [...] redhat.com>
Subject: [PATCH] Fix B extension skip in ext/B/t/strict.t
Date: Mon, 3 Dec 2018 16:48:32 +0100
CC: Petr Písař <ppisar [...] redhat.com>
If perl is built in an environment with a locale where "B" > "attribute" (e.g. "C" locale), ext/B/t/strict.t test will be skipped in contrast to other B tests: ../ext/B/t/showlex.t .............. ok ../ext/B/t/strict.t ............... skipped: Perl was not compiled with B The tests match $Config{'extensions'} for "B" and skip the tests if not found. However, ext/B/t/strict.t uses a distinct regular expression that fails if $Config{'extensions'} starts with "B ". This patch makes the ext/B/t/strict.t test alike to other ones. Signed-off-by: Petr Písař <ppisar@redhat.com> --- ext/B/t/strict.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/B/t/strict.t b/ext/B/t/strict.t index 4d1b84aa20..9f5eacd7da 100644 --- a/ext/B/t/strict.t +++ b/ext/B/t/strict.t @@ -7,7 +7,7 @@ use Config; use Test::More; BEGIN { - if ( ( $Config{'extensions'} !~ /\sB\s/ ) ) { + if ( ( $Config{'extensions'} !~ /\bB\b/ ) ) { plan skip_all => "Perl was not compiled with B"; exit 0; } -- 2.17.2
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.2k
On Fri, 07 Dec 2018 11:30:44 GMT, ppisar wrote: Show quoted text
> If perl is built in an environment with a locale where > "B" > "attribute" (e.g. "C" locale), ext/B/t/strict.t test will be skipped > in contrast to other B tests: > > ../ext/B/t/showlex.t .............. ok > ../ext/B/t/strict.t ............... skipped: Perl was not compiled with B > > The tests match $Config{'extensions'} for "B" and skip the tests if not > found. However, ext/B/t/strict.t uses a distinct regular expression > that fails if $Config{'extensions'} starts with "B ". > > This patch makes the ext/B/t/strict.t test alike to other ones. > > Signed-off-by: Petr Písař <ppisar@redhat.com> > --- > ext/B/t/strict.t | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ext/B/t/strict.t b/ext/B/t/strict.t > index 4d1b84aa20..9f5eacd7da 100644 > --- a/ext/B/t/strict.t > +++ b/ext/B/t/strict.t > @@ -7,7 +7,7 @@ use Config; > use Test::More; > > BEGIN { > - if ( ( $Config{'extensions'} !~ /\sB\s/ ) ) { > + if ( ( $Config{'extensions'} !~ /\bB\b/ ) ) { > plan skip_all => "Perl was not compiled with B"; > exit 0; > }
Thanks. Pushed to blead in commit dc0a6b7d5714e3633ce46346a1b3b56a69b9d164 -- James E Keenan (jkeenan@cpan.org)
Download (untitled) / with headers
text/plain 313b
Thank you for filing this report. You have helped make Perl better. With the release today of Perl 5.30.0, this and 160 other issues have been resolved. Perl 5.30.0 may be downloaded via: https://metacpan.org/release/XSAWYERX/perl-5.30.0 If you find that the problem persists, feel free to reopen this ticket.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org