summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-05-17 07:07:07 +0200
committermkanat%bugzilla.org <>2006-05-17 07:07:07 +0200
commitd72d5a40777fa7e75aeeb145e8fb8a65b97de291 (patch)
tree70c031ece449fe263cf746fb5b585df4cb60eb29 /t
parent9b650b646924f43cb6c7c8c382448f6bae7453df (diff)
downloadbugzilla-d72d5a40777fa7e75aeeb145e8fb8a65b97de291.tar.gz
bugzilla-d72d5a40777fa7e75aeeb145e8fb8a65b97de291.tar.xz
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
Diffstat (limited to 't')
-rw-r--r--t/012throwables.t15
1 files changed, 12 insertions, 3 deletions
diff --git a/t/012throwables.t b/t/012throwables.t
index 2c7a5998b..8bc749686 100644
--- a/t/012throwables.t
+++ b/t/012throwables.t
@@ -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;
}
}