aboutsummaryrefslogtreecommitdiff
path: root/t/TestConfig.pm
diff options
context:
space:
mode:
Diffstat (limited to 't/TestConfig.pm')
-rw-r--r--t/TestConfig.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/TestConfig.pm b/t/TestConfig.pm
index 63b9d06..7f8f232 100644
--- a/t/TestConfig.pm
+++ b/t/TestConfig.pm
@@ -88,3 +88,18 @@ sub errors {
return undef if $self->success;
return @{$self->{errors}};
}
+
+sub lint {
+ my $self = shift;
+ my $synt = shift;
+ local %_ = @_;
+ my $exp = $self->{expected_errors} = delete $_{expect};
+ carp "unknown parameters: " . join(', ', keys(%_)) if (keys(%_));
+
+ $self->SUPER::lint($synt);
+
+ if ($exp && @{$self->{expected_errors}}) {
+ $self->{status} = 0;
+ $self->error("not all expected errors reported");
+ }
+}

Return to:

Send suggestions and report system problems to the System administrator.