diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2010-10-15 02:10:55 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2010-10-15 02:10:55 +0200 |
commit | fc99fef185a7877acb98613b60586c7f491444db (patch) | |
tree | a018a31b2173cfecc0d4bcd4eafafd95f158c04b /t | |
parent | e60d388f70533d0efd0632f39aadddcb2590a171 (diff) | |
download | bugzilla-fc99fef185a7877acb98613b60586c7f491444db.tar.gz bugzilla-fc99fef185a7877acb98613b60586c7f491444db.tar.xz |
Bug 604522: t/012throwables.t doesn't catch new user errors correctly
r/a=mkanat
Diffstat (limited to 't')
-rw-r--r-- | t/012throwables.t | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/012throwables.t b/t/012throwables.t index 4be02c58a..3738ad524 100644 --- a/t/012throwables.t +++ b/t/012throwables.t @@ -117,7 +117,7 @@ foreach my $file (keys %test_modules) { # Bugzilla/Error.pm) $lineno++; if ($line =~ -/^[^#]*(Throw(Code|User)Error|error\s+=>)\s*\(?\s*["'](.*?)['"]/) { +/^[^#]*\b(Throw(Code|User)Error|(user_)?error\s+=>)\s*\(?\s*["'](.*?)['"]/) { my $errtype; # If it's a normal ThrowCode/UserError if ($2) { @@ -125,9 +125,9 @@ foreach my $file (keys %test_modules) { } # If it's an AUTH_ERROR tag else { - $errtype = 'code'; + $errtype = $3 ? 'user' : 'code'; } - my $errtag = $3; + my $errtag = $4; push @{$Errors{$errtype}{$errtag}{used_in}{$file}}, $lineno; } } |