Subject: | Test failure under recent blead |
As of Perl 5.27.11, Unicode property tests in regexes very rarely invoke the swash mechanism. This causes tests to fail.
The attached patch changes the test suite so that, on a sufficiently recent Perl, we use one of the few Unicode property tests that does invoke the swash mechanism.
Thanks.
Subject: | lexical_sealrequirehints_5_28.diff |
Binary files Lexical-SealRequireHints-0.011.orig/t/.swash.t.swp and Lexical-SealRequireHints-0.011/t/.swash.t.swp differ
diff -urN Lexical-SealRequireHints-0.011.orig/t/swash.t Lexical-SealRequireHints-0.011/t/swash.t
--- Lexical-SealRequireHints-0.011.orig/t/swash.t 2017-07-15 22:56:08.000000000 +0200
+++ Lexical-SealRequireHints-0.011/t/swash.t 2018-04-22 15:08:14.000000000 +0200
@@ -44,8 +44,13 @@
# is the execution. Hence for this test we must arrange for
# both to occur between the surrounding segments of test code.
# A BEGIN block achieves this nicely.
- my $x = "foo\x{666}";
- $x =~ /foo\p{Alnum}/;
+ #
+ # From Perl 5.27.11 onwards, far fewer properties cause the swash
+ # mechanism to be invoked. One option is an nv property in
+ # non-canonical form, but nv properties don't work in older Perls.
+ my ($x, $prop) = "$]" >= 5.027011 ? ("foo\x{be}", '\p{nv=0.75}')
+ : ("foo\x{666}", '\p{Alnum}');
+ $x =~ /foo$prop/;
}
BEGIN {
ok exists($INC{"utf8.pm"});