aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xchallenge-090/abigail/test.pl12
1 files changed, 11 insertions, 1 deletions
diff --git a/challenge-090/abigail/test.pl b/challenge-090/abigail/test.pl
index d9d74784f7..8971d7d938 100755
--- a/challenge-090/abigail/test.pl
+++ b/challenge-090/abigail/test.pl
@@ -178,7 +178,10 @@ foreach my $challenge (@challenges) {
while ($exp =~ s/^\s*#%\s*(.*)\n//) {
my $pragma = $1;
$pragma =~ s/\s+$//;
- if ($pragma =~ /^\w+$/) {
+ if ($pragma =~ s/^\@(\S+)\s*//) {
+ next unless lc ($1) eq lc ($language);
+ }
+ if ($pragma =~ /^[-\w]+$/) {
$pragma {lc $pragma} = 1;
next;
}
@@ -214,6 +217,13 @@ foreach my $challenge (@challenges) {
if ($pragma {trim}) {
s/^\h+//gm for $exp, $got;
}
+ if ($pragma {"swap-pairs"}) {
+ my @got = split /\n/ => $got;
+ for (my $i = 0; $i + 1 < @got; $i += 2) {
+ @got [$i, $i + 1] = @got [$i + 1, $i];
+ }
+ $got = join "\n" => @got, "";
+ }
is $got, $exp, $name;
}}
unlink $compiled if $compiled;