Skip to content

Commit 0ff0286

Browse files
do not complain about exceptions if the test is marked todo
1 parent 3a4e0e4 commit 0ff0286

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

t/lib/Acceptance.pm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ sub acceptance_tests (%options) {
5555
die 'results inconsistent between short_circuit = false and true'
5656
if not $ENV{NO_SHORT_CIRCUIT} and ($result->{valid} xor $result_short->{valid});
5757

58+
my $in_todo;
59+
5860
# if any errors contain an exception, generate a warning so we can be sure
5961
# to count that as a failure (an exception would be caught and perhaps TODO'd).
6062
# (This might change if tests are added that are expected to produce exceptions.)
@@ -63,7 +65,8 @@ sub acceptance_tests (%options) {
6365
foreach
6466
grep +($_->{error} =~ /^EXCEPTION/
6567
&& $_->{error} !~ /but short_circuit is enabled/ # unevaluated*
66-
&& $_->{error} !~ /(max|min)imum value is not a number$/), # optional/bignum.json
68+
&& $_->{error} !~ /(max|min)imum value is not a number$/) # optional/bignum.json
69+
&& !($in_todo //= grep $_->{todo}, Test2::API::test2_stack->top->{_pre_filters}->@*),
6770
$r->{errors}->@*;
6871
}
6972

0 commit comments

Comments
 (0)