Branch Coverage

lib/Rex/Commands/Run.pm
Criterion Covered Total %
branch 37 74 50.0


line true false branch
61 67 0 if (not $^O =~ /^MSWin/u) { }
204 0 11 if (ref $cmd eq "ARRAY")
212 0 11 if (ref $_[0] eq "CODE")
217 0 11 if (ref $_[0] eq "ARRAY")
221 2 9 if (scalar @_ > 0)
226 10 1 unless exists $option->{'auto_die'}
230 0 0 if (exists $option->{'only_notified'} and $option->{'only_notified'})
250 0 11 if (exists $option->{'command'})
259 0 11 if (exists $option->{'creates'})
261 0 0 if ($fs->is_file($option->{'creates'}))
268 0 11 if (exists $option->{'only_if'})
270 0 0 if ($? != 0)
278 0 11 if (exists $option->{'unless'})
280 0 0 if ($? == 0)
290 11 0 if ($changed) { }
293 11 0 unless ("Rex::Config"->get_no_path_cleanup)
299 0 11 if ($args and ref $args eq "ARRAY")
304 0 11 if (exists $option->{'timeout'} and $option->{'timeout'} > 0) { }
312 0 0 if ($@ =~ /^timeout at/u)
321 10 1 if $out
322 1 10 if $err
326 0 11 unless (defined $out)
330 10 1 unless (defined $err)
334 1 10 if ($? == 127) { }
5 5 elsif ($? != 0 and $? != 300) { }
5 0 elsif ($? == 0) { }
335 0 1 if "Rex::Config"->get_verbose_run
339 0 5 if "Rex::Config"->get_verbose_run
343 0 5 if "Rex::Config"->get_verbose_run
347 0 11 if ($code) { }
367 3 8 if (exists $option->{'auto_die'} and $option->{'auto_die'})
368 2 1 if ($? != 0)
373 0 9 if (wantarray and defined $out_ret)
457 0 0 if (ref $cmd eq "HASH")
462 0 0 if ($cmd eq 'on' or $cmd eq '-on' or $cmd eq '1') { }
0 0 elsif ($cmd eq '0') { }
479 0 0 if (ref $cmd eq 'CODE') { }