develooper Front page | perl.perl5.porters | Postings from December 2018

[perl #133713] [PATCH] Fix B extension skip in ext/B/t/strict.t

Thread Next
From:
James E Keenan via RT
Date:
December 7, 2018 14:38
Subject:
[perl #133713] [PATCH] Fix B extension skip in ext/B/t/strict.t
Message ID:
rt-4.0.24-16768-1544193513-1396.133713-15-0@perl.org
On Fri, 07 Dec 2018 11:30:44 GMT, ppisar wrote:
> 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)

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=133713

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About