Branch Coverage

blib/lib/NBI/Job.pm
Criterion Covered Total %
branch 59 96 61.4


line true false branch
47 122 0 if (substr($_[0], 0, 1) eq "-")
51 122 240 if ($i =~ /^-name/u) { }
121 119 elsif ($i =~ /^-command$/u) { }
119 0 elsif ($i =~ /^-opts$/u) { }
0 0 elsif ($i =~ /^-commands$/u) { }
57 119 0 if ($data{$i}->isa('NBI::Opts')) { }
67 0 0 if (ref $data{$i} eq 'ARRAY') { }
81 122 0 defined $job_name ? :
85 0 122 if (defined $commands_array) { }
121 1 elsif (defined $command) { }
87 0 0 if (defined $command)
95 119 3 if (defined $opts) { }
97 119 0 if ($opts->isa('NBI::Opts')) { }
114 8 114 if ($self->opts->is_array)
127 0 1 if defined $new_val
134 0 455 if defined $new_val
141 0 10 if (defined $new_val and not $new_val =~ /^-?(\d+)$/u)
144 0 10 if defined $new_val
153 0 216 if (defined $parameter)
154 0 0 if ($parameter eq '-interpolate') { }
162 114 102 unless (defined $self->{'output_file'})
166 0 216 if ($interpolate) { }
182 0 216 if (defined $parameter)
183 0 0 if ($parameter eq '-interpolate') { }
191 114 102 unless (defined $self->{'error_file'})
195 0 216 if ($interpolate) { }
207 4 1 if ($self->opts->is_array)
215 0 0 if ($self->opts->is_array)
234 1 0 if ($opts->isa('NBI::Opts')) { }
277 8 207 if ($self->opts->is_array)
281 8 207 if ($self->opts->is_array)
284 1 64 if ($self->opts->is_files_array and $cmd =~ /\$\{selected_file\}/u)
288 6 58 if ($self->opts->is_params_array and $cmd =~ /\$\{param_\d+\}/u)
293 1 7 if ($has_array_variable == 0)
294 0 1 if ($self->opts->is_files_array)
307 1 11 if ($self->opts->is_files_array)
311 11 1 if ($self->opts->is_params_array)
319 3 5 if ($self->opts->{'array_offset'} and $self->opts->{'array_offset'} > 0)
322 1 7 if ($self->opts->is_files_array)
336 7 0 if ($self->opts->is_params_array)
364 0 7 unless (defined $self->opts->queue)
368 0 7 unless (defined $self->opts)
372 0 7 if ($self->commands_count == 0)
383 0 7 if (-e $script_file)
393 0 7 unless open my $fh, ">", $script_file
399 0 7 if (_has_command("sbatch") == 0)
406 7 0 if ($job_output =~ /Submitted batch job (\d+)/u) { }
439 0 7 if ($^O eq 'MSWin32') { }