Condition Coverage

blib/lib/App/Sqitch/Engine.pm
Criterion Covered Total %
condition 95 189 50.2


and 3 conditions

line !l l&&!r l&&r condition
534 10 3 1 $pending and $to_idx < $plan->count - 1
935 4 1 3 $state->{'script_hash'} and $state->{'script_hash'} eq $state->{'change_id'}
1109 2 0 3 $oldver == 0 and not $self->initialized
1150 0 0 0 @scripts and $scripts[-1][0] == $newver

or 2 conditions

line l !l condition
256 6 2 $mode ||= "all"
592 2 7 $_->id // ""
597 2 8 $_->id // ""
661 2 4 $_->{'asof_tag'} // ""
718 19 2 $self->change_id_for("change_id", $p{'change_id'}, "change", $p{'change'}, "tag", $p{'tag'}, "project", $p{'project'} || $self->plan->project) // (return)
738 6 3 $self->change_id_for("change_id", $p{'change_id'}, "change", $p{'change'}, "tag", $p{'tag'}, "project", $p{'project'} || $self->plan->project) // (return)
752 25 19 $params->{'tags'} || []
763 1 4 $rework_tags_for{$prev_idx} ||= []
766 1 5 $$ctags[$i++] ||= []
777 0 2 $rework_tags_for{$#changes + 1} ||= []
782 0 6 $$ctags[$i++] ||= []
825 2 0 $self->name_for_change_id($id) // ""
1088 2 0 $self->earliest_change_id(@_) // (return undef)
1094 2 0 $self->latest_change_id(@_) // (return undef)
1146 0 0 $1 || 0

or 3 conditions

line l !l&&r !l&&!r condition
159 5 1 0 ref $_[0] || shift()
200 7 1 0 $plan->index_of($to) // hurl("plan", &__x("Unknown change: \"{change}\"", "change", $to))
431 0 0 1 $plan->index_of($id) // $plan->count - 1
442 17 2 0 $self->change_id_for_key($key) || hurl($ident, $plan->contains($key) ? &__x('Change "{change}" has not been deployed', 'change', $key) : &__x('Cannot find "{change}" in the database or the plan', 'change', $key))
453 16 0 1 $plan->index_of($to_id) // hurl($ident, &__x("Change \"{change}\" is deployed, but not planned", "change", $key))
510 5 0 0 eval {
585 3 5 0 $to_index //= $plan->count - 1
606 4 1 3 @conflicts or @required
676 0 16 1 defined $dep->id or defined $dep->change
16 0 1 defined $dep->id or defined $dep->change or defined $dep->tag
701 1 1 15 $cname eq "HEAD" or $cname eq "ROOT"
718 1 20 0 $p{'project'} || $self->plan->project
738 1 8 0 $p{'project'} || $self->plan->project
857 1 0 0 eval {
921 8 0 0 $plan->index_of($state->{'change_id'}) // hurl("plan", &__x("Cannot find change {id} ({change}) in {file}", "id", $state->{'change_id'}, "change", join(" ", $state->{'change'}, @{[] unless $state->{'tags'};}), "file", $plan->file))
977 9 0 0 eval {
988 1 0 0 eval {
1019 1 0 0 eval {
1078 1 0 0 ref $_[0] || $_[0]
1184 4 1 4 $i + $from_idx >= $plan->count or $change->script_hash ne $plan->change_at($i + $from_idx)->script_hash
1252 1 0 0 ref $_[0] || $_[0]
1257 1 0 0 ref $_[0] || $_[0]
1262 1 0 0 ref $_[0] || $_[0]
1267 1 0 0 ref $_[0] || $_[0]
1272 1 0 0 ref $_[0] || $_[0]
1277 1 0 0 ref $_[0] || $_[0]
1282 1 0 0 ref $_[0] || $_[0]
1287 1 0 0 ref $_[0] || $_[0]
1292 1 0 0 ref $_[0] || $_[0]
1297 1 0 0 ref $_[0] || $_[0]
1302 1 0 0 ref $_[0] || $_[0]
1307 1 0 0 ref $_[0] || $_[0]
1312 1 0 0 ref $_[0] || $_[0]
1317 1 0 0 ref $_[0] || $_[0]
1322 1 0 0 ref $_[0] || $_[0]
1327 1 0 0 ref $_[0] || $_[0]
1332 1 0 0 ref $_[0] || $_[0]
1337 1 0 0 ref $_[0] || $_[0]
1342 1 0 0 ref $_[0] || $_[0]
1347 1 0 0 ref $_[0] || $_[0]
1352 1 0 0 ref $_[0] || $_[0]
1357 1 0 0 ref $_[0] || $_[0]
1362 1 0 0 ref $_[0] || $_[0]
1367 1 0 0 ref $_[0] || $_[0]
1372 1 0 0 ref $_[0] || $_[0]
1377 1 0 0 ref $_[0] || $_[0]
1382 1 0 0 ref $_[0] || $_[0]
1387 1 0 0 ref $_[0] || $_[0]
1392 1 0 0 ref $_[0] || $_[0]