Skip to content

Commit

Permalink
Change the name of the output file to be the same as the source test
Browse files Browse the repository at this point in the history
The file we generate the tests from is GraphemeBreakTest.txt
Let's call it the same.
  • Loading branch information
samcv committed Dec 24, 2016
1 parent 0fec90b commit 9920a6e
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,15 @@ sub MAIN ( Str $GrahemeBreakTest-file ) {
my @text = $GrahemeBreakTest-file.IO.slurp.lines;
my $line-no = 0;
my @array;
say @text;
for @text -> $line {
$line-no++;
say $line;
next if $line ~~ / ^ \s* '#' /;
$line ~~ / ^ $<beginning>=(.*) '#' $<comment>=( .* ) $ /;
if ! defined any($<comment>, $<beginning>) {
say "Something went wrong.";
say "Or maybe you need to update this script?";
exit 1
}
say $<comment>.defined;
say $<beginning>.defined;
my $comment = $<comment>.trim;
my $beginning = $<beginning>.trim;
# Remove the beginning and end, since we always break at start and end of string
Expand Down Expand Up @@ -65,5 +61,5 @@ sub MAIN ( Str $GrahemeBreakTest-file ) {
for @array {
$file ~= $_ ~ "\n";
}
spurt "S15-nfg/GraphemeBreakPropertyTest.t", $file;
spurt "S15-nfg/GraphemeBreakTest.t", $file;
}

0 comments on commit 9920a6e

Please sign in to comment.