Branch Coverage

blib/lib/NBI/Job.pm
Criterion Covered Total %
branch 35 84 41.6


line true false branch
47 105 0 if (substr($_[0], 0, 1) eq "-")
51 105 206 if ($i =~ /^-name/u) { }
104 102 elsif ($i =~ /^-command$/u) { }
102 0 elsif ($i =~ /^-opts$/u) { }
0 0 elsif ($i =~ /^-commands$/u) { }
57 102 0 if ($data{$i}->isa('NBI::Opts')) { }
67 0 0 if (ref $data{$i} eq 'ARRAY') { }
81 105 0 defined $job_name ? :
85 0 105 if (defined $commands_array) { }
104 1 elsif (defined $command) { }
87 0 0 if (defined $command)
95 102 3 if (defined $opts) { }
97 102 0 if ($opts->isa('NBI::Opts')) { }
114 1 104 if ($self->opts->is_array)
121 1 0 if ($cmd =~ $self->opts->placeholder)
135 0 0 if defined $new_val
142 0 409 if defined $new_val
149 0 0 if (defined $new_val and not $new_val =~ /^-?(\d+)$/u)
152 0 0 if defined $new_val
161 0 203 if (defined $parameter)
162 0 0 if ($parameter eq '-interpolate') { }
170 102 101 unless (defined $self->{'output_file'})
174 0 203 if ($interpolate) { }
190 0 203 if (defined $parameter)
191 0 0 if ($parameter eq '-interpolate') { }
199 102 101 unless (defined $self->{'error_file'})
203 0 203 if ($interpolate) { }
215 0 1 if ($self->opts->is_array)
224 0 0 if ($self->opts->is_array)
244 1 0 if ($opts->isa('NBI::Opts')) { }
288 1 202 if ($self->opts->is_array)
307 1 202 if ($self->opts->is_array)
311 1 3 if ($cmd =~ /\$\{selected_file\}/u)
316 0 1 if ($selected_file == 0)
331 0 0 unless (defined $self->opts->queue)
335 0 0 unless (defined $self->opts)
339 0 0 if ($self->commands_count == 0)
350 0 0 if (-e $script_file)
360 0 0 unless open my $fh, ">", $script_file
366 0 0 if (_has_command("sbatch") == 0)
373 0 0 if ($job_output =~ /Submitted batch job (\d+)/u) { }
406 0 0 if ($^O eq 'MSWin32') { }