This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a96c10
)
fold_grind.t: Ignore blank lines
author
Karl Williamson
<public@khwilliamson.com>
Wed, 21 Sep 2011 16:15:02 +0000
(10:15 -0600)
committer
Karl Williamson
<public@khwilliamson.com>
Wed, 21 Sep 2011 16:23:56 +0000
(10:23 -0600)
This is in preparation for Unicode 6.1, which has blank lines in the
.txt file that fold_grind reads. The line that strips off comments did
not work on plain null lines.
t/re/fold_grind.t
patch
|
blob
|
blame
|
history
diff --git
a/t/re/fold_grind.t
b/t/re/fold_grind.t
index
b8a1acb
..
98fc396
100644
(file)
--- a/
t/re/fold_grind.t
+++ b/
t/re/fold_grind.t
@@
-246,8
+246,9
@@
while (<$fh>) {
# Lines look like (though without the initial '#')
#0130; F; 0069 0307; # LATIN CAPITAL LETTER I WITH DOT ABOVE
- my ($line, $comment) = split / \s+ \# \s+ /x, $_;
- next if $line eq "" || $line =~ /^#/;
+ # Get rid of comments, ignore blank or comment-only lines
+ my $line = $_ =~ s/ (?: \s* \# .* )? $ //rx;
+ next unless length $line;
my ($hex_from, $fold_type, @hex_folded) = split /[\s;]+/, $line;
next if $fold_type eq 'T'; # Perl doesn't do Turkish folding