Branch Coverage

blib/lib/Jenkins/i18n.pm
Criterion Covered Total %
branch 71 94 75.5


line true false branch
85 0 6 unless (exists $i18n_ref->{$entry} and defined $i18n_ref->{$entry})
93 0 6 if ($i18n_ref->{$entry} eq "")
94 0 0 if (has_empty($entry)) { }
132 1 9 unless $jelly_ref
134 1 8 unless ref $jelly_ref eq "HASH"
135 1 7 unless $properties_ref
137 1 6 unless ref $properties_ref eq "HASH"
141 1 5 if (scalar keys %{$jelly_ref;} == 0)
146 7 8 if (exists $properties_ref->{$prop_key}) { }
206 2 1 if $processor->is_debug
210 2 1 if ($processor->is_debug)
221 3 0 if (-f $jelly_file) { }
233 2 1 if ($processor->is_debug)
287 1 5 unless defined $file
289 1 4 unless defined $keys
290 1 3 unless ref $keys eq "Set::Tiny"
293 1 2 unless ref $license_ref eq "ARRAY"
296 1 1 unless defined $use_backup
300 1 1 if ($use_backup) { }
302 0 1 unless rename $file, $backup
317 0 2 unless open my $out, ">", $file
319 0 2 unless close $out
360 1 4 unless $dir
362 1 3 unless ref $dir eq ""
364 1 2 unless -d $dir
365 0 2 unless ref $all_known_langs eq "Set::Tiny"
381 13 0 unless ($file =~ /$src_regex/u or $file =~ /$target_regex/u)
382 5 8 if ($file =~ /$msgs_regex/u or $file =~ /$jelly_regex/u) { }
389 5 3 if ($file =~ /$properties_regex/u)
395 0 5 if $pieces[0] eq ""
397 2 3 if (scalar @pieces < $min_file_pieces) { }
401 0 3 if (scalar @pieces == $min_file_pieces and length $pieces[-1] == $lang_code_length) { }
3 0 elsif (scalar @pieces > $min_file_pieces and length $pieces[-1] == $country_code_length and length $pieces[-2] == $lang_code_length) { }
407 0 0 if $all_known_langs->member($pieces[-1])
420 3 0 if $all_known_langs->member($pieces[-2] . "_" . $pieces[-1])
464 0 1 unless $dir
466 0 1 unless ref $dir eq ""
468 0 1 unless -d $dir
475 4 0 unless ($file =~ /$src_regex/u or $file =~ /$target_regex/u)
476 1 3 if ($file =~ /$regex/u)
479 1 0 if ($2) { }
522 0 10 unless $file
524 1 9 unless defined $must_warn
527 2 7 unless (-f $file)
528 1 1 if $must_warn
551 0 5 unless open my $fh, "<", $file
554 210 10 unless /\$\{.*?\%([^\(]+?).*\}/u