Branch Coverage

blib/lib/Oxford/Calendar.pm
Criterion Covered Total %
branch 72 100 72.0


line true false branch
118 0 14 unless defined $week
120 0 14 if abs $week == 1
121 3 11 if abs $week == 2
122 1 13 if abs $week == 3
143 0 3 if (-r '/etc/oxford-calendar.yaml') { }
155 0 148 unless $db{$termspec}
157 0 148 unless my $time = eval { do { 'Time::Piece'->strptime($db{$termspec}{'start'}, '%d/%m/%Y') } }
176 0 1 if ($term eq 'Michaelmas') { }
1 0 elsif ($term eq 'Hilary') { }
0 0 elsif ($term eq 'Trinity') { }
189 0 17 unless defined $_initcal
191 2 15 unless $date
200 2 5 unless defined $_initrange
208 7 258 if ($tm < $curterm->[0])
209 7 0 if ($prevterm and $tm >= $prevterm->[1] + 604800) { }
219 0 7 unless $nextterm
225 2 5 if (abs $prevgap < abs $nextgap) { }
232 3 2 if $delta % 7
235 1 6 if $term[4] and $confirmed
236 1 5 if wantarray
321 3 21 unless defined $_initcal
325 14 10 if ($#term) { }
329 2 12 unless $#term_start == 2
331 2 10 $days_from_start < 0 ? :
333 1 11 if $options->{'confirmed'} and $provisional
334 1 10 if $week < 1 || $week > 8 and $mode eq 'full_term'
335 1 9 if wantarray
338 1 9 if $mode eq 'full_term'
339 2 7 if $mode eq 'ext_term'
360 16 62 if ($date >= $start and $date <= $end)
380 1 1 if (@this_term == 2) { }
405 0 32 unless $year
419 5 27 if ($hilary_delta == 1) { }
435 0 32 if ($trinity_delta == 1) { }
482 0 3 if $year < 1900
3 3 if ($1 > 50) { }
486 6 192 if ($string =~ s/\b$_\w+//i)
491 3 3 if scalar grep(/$expand/, ('Michaelmas', 'Hilary', 'Trinity')) > 0
492 3 3 if scalar grep(/$expand/, ('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday')) > 0
495 0 3 unless ($day)
498 0 0 if ($string =~ /$_/gi)
506 0 3 unless ($term)
509 0 0 if ($string =~ /$_/gi)
519 0 3 unless ($term)
521 0 0 unless $term =~ /week/
524 0 3 unless $year
525 0 3 unless defined $week and defined $day
546 0 4 unless defined $_initcal
551 1 3 unless exists $db{"$term $year"}
559 0 3 unless $start[0]