-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Description
problem:
I want to do this in a test file (so as to add a bit of extra code on top for testing various installation scenarios):
unless (my $return = do './'.$file) {
warn "couldn't parse $file: '$@'" if $@;
warn "couldn't do $file: '$!'" unless defined $return;
warn "couldn't run $file'" unless $return;
}
..except the test is always reported as a failure, because done_testing() doesn't return true.
I think this might be the right place to fix it - what do you think?
diff --git a/lib/Test2/API.pm b/lib/Test2/API.pm
index d09a21f9a..64c0d3361 100644
--- a/lib/Test2/API.pm
+++ b/lib/Test2/API.pm
@@ -580,7 +580,7 @@ Removing the old context and creating a new one...
sub release($;$) {
$_[0]->release;
- return $_[1];
+ return $_[1] // 1;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels