Branch Coverage

blib/lib/Cron/Sequencer/CLI.pm
Criterion Covered Total %
branch 44 50 88.0


line true false branch
30 20 138 if ($item eq '--') { }
19 119 elsif ($item =~ /\A--json(?:=(.*)|)\z/su and not @groups) { }
40 15 4 if (length $1) { }
44 1 19 unless $known_json{$opt}
49 2 3 if $json->{'seq'} and $json->{'split'}
65 0 37 unless (&GetOptionsFromArray($groups[0], \%global_options, "show=s", "from=s", "to=s", "hide-env", "group!"))
82 4 50 unless (&GetOptionsFromArray($group, \%options, "env=s\@", "ignore=s\@"))
90 2 2 if $global_options{'hide-env'} and $options{'env'}
95 1 29 unless @input
100 10 19 if $json
111 17 53 if (defined $options->{'from'} or defined $options->{'to'}) { }
113 0 17 if defined $options->{'show'}
117 7 10 if ($from =~ /\A[1-9][0-9]*\z/u) { }
10 0 elsif ($from =~ /\A[-+](?:0|[1-9][0-9]*)\z/u) { }
129 8 9 if ($to =~ /\A[1-9][0-9]+\z/u) { }
9 0 elsif ($to =~ /\A\+[1-9][0-9]*\z/u) { }
140 0 17 if $end <= $start
144 9 44 if ($show =~ /\A\s*(last|this|next)\s+(hour|day|week)\s*\z/u) { }
3 41 elsif ($show =~ /\A\s*(last|next)\s+([1-9][0-9]*)\s+(hour|day|week)s\s*\z/u) { }
2 39 elsif ($show =~ /\A\s*yesterday\s*\z/u) { }
39 0 elsif ($show =~ /\A\s*(today|tomorrow)\s*\z/u) { }
148 3 6 if ($which eq 'last') { }
153 3 3 if $which eq "next"
168 1 2 if ($which eq 'last') { }
184 2 37 if $1 eq "tomorrow"