From aeeea53192101dd80e4f3a5fae86b0e979bff1e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Mon, 19 Dec 2016 10:20:01 +0100 Subject: [PATCH] =?utf8?q?Mehr=20als=20eine=20SelfTest-Modul=20pr=C3=BCfen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Der Aufruf der SelfTest funktionierte nur für genau eine Datei - Mit einer leicht anderen Aufruf-Syntax werden auch weitere Tests durchgeführt. --- SL/BackgroundJob/SelfTest.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/SL/BackgroundJob/SelfTest.pm b/SL/BackgroundJob/SelfTest.pm index 2f8883339..b34b71d65 100644 --- a/SL/BackgroundJob/SelfTest.pm +++ b/SL/BackgroundJob/SelfTest.pm @@ -95,11 +95,10 @@ sub run_module { } or $self->add_errors($::locale->text('Could not load class #1 (#2): "#3"', $module, $file, $@)) && return; eval { - my $worker = $module->new; - $worker->tester($self->tester); - - $worker->run; - 1; + $self->tester->subtest($module => sub { + $module->new->run; + }); + 1 } or $self->add_errors($::locale->text('Could not load class #1, #2', $module, $@)) && return; $self->add_full_diag($output); -- 2.20.1