Branch Coverage

script/moku-pona
Criterion Covered Total %
branch 78 154 50.6


line true false branch
130 0 9 if $ENV{'MOKU_PONA'}
132 0 9 if $ENV{'XDG_DATA_HOME'} and -d $ENV{'XDG_DATA_HOME'} . '/moku-pona'
133 0 9 if $ENV{'HOME'} and -d $ENV{'HOME'} . '/.local/moku-pona'
134 0 9 if $ENV{'HOME'} and -d $ENV{'HOME'} . '/.moku-pona'
135 0 9 if $ENV{'APPDATA'} and -d $ENV{'APPDATA'} . '/.moku-pona'
136 0 9 if $ENV{'LOGDIR'} and -d $ENV{'LOGDIR'} . '/.moku-pona'
138 0 9 if $ENV{'XDG_DATA_HOME'}
139 0 9 if $ENV{'HOME'} and -d $ENV{'HOME'} . '/.local'
140 9 0 if $ENV{'HOME'}
141 0 0 if $ENV{'APPDATA'}
142 0 0 if $ENV{'LOGDIR'}
182 30 14 if /^=> /u
184 11 3 if ($host and $port)
205 0 0 unless $scheme and $scheme eq 'gemini'
206 0 0 unless $authority
213 0 0 unless ($stream)
221 0 0 unless $header
234 0 10 unless ($stream)
251 0 10 unless $scheme =~ /^gophers?$/u
252 10 0 if substr($path, 0, 1) eq '/'
253 10 0 $path ? :
254 10 0 $path ? :
268 0 0 if $query
270 0 0 $tls ? :
279 0 0 unless $header
300 8 21 unless -f $file
301 0 21 unless open my $fh, '<:encoding(UTF-8)', $file
310 3 14 unless -f $file
311 0 14 unless open my $fh, '<:encoding(UTF-8)', $file
320 1 21 unless -d $data_dir
321 0 22 unless open my $fh, '>:encoding(UTF-8)', $file
349 0 1 unless @$site
380 0 8 if (grep /^=> $uri_re /u, @$site) { }
0 8 elsif (grep /^=> \S+ $name_re/u, @$site) { }
413 2 2 if ($name eq $args[$j]) { }
422 2 2 unless $found
424 2 0 if ($count) { }
425 2 0 $count == 1 ? :
466 0 2 unless opendir my $dh, $data_dir
471 2 6 if $file eq $site_list
472 2 4 if $file eq $updated_list
473 2 2 if $caches{$file}
474 1 1 if ($confirm) { }
482 2 0 if (-f $updated_list)
483 0 2 unless open my $fh, '<:encoding(UTF-8)', $updated_list
492 2 2 if ($line =~ /^=> \S+ \d\d\d\d-\d\d-\d\d (.+)/u and not $sites{$1}) { }
499 1 1 if @deletes and not $confirm
502 1 1 if $confirm
504 1 1 if ($todo and not $confirm)
553 3 1 if (-f $updated_list)
554 0 3 unless open my $fh, '<:encoding(UTF-8)', $updated_list
580 0 10 unless @sites == 0 or grep {$_ eq $name;} @sites
581 10 0 unless $quiet
585 10 0 if ($uri =~ /^gopher/u) { }
0 0 elsif ($uri =~ /^gemini/u) { }
0 0 elsif ($uri =~ /^http/u) { }
596 5 0 unless 'Mojo::IOLoop'->is_running
602 0 10 unless ($new)
609 2 8 if ($new =~ /^<(\?xml|rss)/u)
615 4 6 if ($new ne $old) { }
616 4 0 unless $quiet
620 6 0 unless $quiet
669 0 5 if ($@)
684 1 6 unless $links
722 0 1 unless -d $target
723 0 1 unless -f $site_list
724 0 1 unless -f $updated_list
729 0 1 unless open my $in, '<:encoding(UTF-8)', $updated_list
731 0 1 unless open my $out, '>:encoding(UTF-8)', "$target/updates.txt"
740 1 0 if (-f "$data_dir/$uri")
754 0 0 if ($command eq 'add') { }
0 0 elsif ($command eq 'remove') { }
0 0 elsif ($command eq 'list') { }
0 0 elsif ($command eq 'cleanup') { }
0 0 elsif ($command eq 'update') { }
0 0 elsif ($command eq 'convert') { }
0 0 elsif ($command eq 'publish') { }