summaryrefslogtreecommitdiff
path: root/t/re
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-09-21 10:15:02 -0600
committerKarl Williamson <public@khwilliamson.com>2011-09-21 10:23:56 -0600
commit3abacf659103620efac9195fd5412a4c8dbe3b87 (patch)
tree5a89caef321557db08a152fa82ff4c4eefbf8652 /t/re
parent9a96c1062b53b9978cf17e42d11555c1a59e70d2 (diff)
downloadperl-3abacf659103620efac9195fd5412a4c8dbe3b87.tar.gz
fold_grind.t: Ignore blank lines
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.
Diffstat (limited to 't/re')
-rw-r--r--t/re/fold_grind.t5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/re/fold_grind.t b/t/re/fold_grind.t
index b8a1acba3b..98fc3966c5 100644
--- 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