Commit d72d5a40 authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Bug 337701: 012throwables.t doesn't recognize that certain errors are AUTH_ERROR codes

Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
parent 9b650b64
......@@ -113,9 +113,18 @@ foreach my $file (keys %test_modules) {
last if $line =~ /^__END__/; # skip the POD (at least in
# Bugzilla/Error.pm)
$lineno++;
if ($line =~ /^[^#]*Throw(Code|User)Error\s*\(\s*["'](.*?)['"]/) {
my $errtype = lc($1);
my $errtag = $2;
if ($line =~
/^[^#]*(Throw(Code|User)Error|error\s+=>)\s*\(?\s*["'](.*?)['"]/) {
my $errtype;
# If it's a normal ThrowCode/UserError
if ($2) {
$errtype = lc($2);
}
# If it's an AUTH_ERROR tag
else {
$errtype = 'code';
}
my $errtag = $3;
push @{$Errors{$errtype}{$errtag}{used_in}{$file}}, $lineno;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment