This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Allow comments in regexp optimization tests
authorHugo van der Sanden <hv@crypt.org>
Fri, 13 Nov 2020 15:18:31 +0000 (15:18 +0000)
committerKarl Williamson <khw@cpan.org>
Thu, 24 Dec 2020 04:10:57 +0000 (21:10 -0700)
t/re/opt.t

index 68dca27..01ac6e3 100644 (file)
@@ -51,6 +51,10 @@ use re ();
 
 while (<DATA>) {
     chomp;
+    if (m{^\s*(?:#|\z)}) {
+        # skip blank/comment lines
+        next;
+    }
     my($pat, $minlen, $anchored, $floating, $other, $comment) = split /\t/;
     my %todo;
     my %opt = map {