Branch Coverage

blib/lib/Terminal/Identify.pm
Criterion Covered Total %
branch 21 64 32.8


line true false branch
142 24 4 defined $_[0] && $_[0] ne '' ? :
164 12 0 if (defined $_[0] and length $_[0] > 0) { }
194 8 0 if (-f $file)
221 0 4 if (defined $user and $user ne "")
254 16 4 if ($line =~ m[^/.*/(.*)$])
303 0 4 defined $term_path ? :
350 4 0 if (not defined $term_path or $term_path eq '') { }
355 0 0 if ($term_path =~ m[^.*/dev/(pts/\d+)$]) { }
0 0 elsif ($term_path =~ m[^.*/dev/(tty\d+)$]) { }
370 4 24 if ($shell ne "nologin" and $shell ne "sync" and $shell ne "false")
372 0 4 if (grep /^$user$/, @user_array and grep /^$shell$/, @shell_array) { }
4 0 elsif ($user eq $username) { }
421 4 0 if ($process ne "")
427 0 4 if (@match == 0)
441 0 0 if ($process ne "")
495 0 4 if (@result == 0)
504 4 0 if (@match > 0) { }
534 0 0 if ($terminal_command =~ /$re_ws/) { }
546 0 0 if (`which $_` ne "")
552 0 0 if (@progs == 0) { }
556 0 0 if (@progs > 1) { }
583 0 0 if ($terminal_path =~ /$re_pp/) { }
605 0 0 if (defined $termhash{$terminal_name}) { }
629 0 4 if ($OutputFormat ne '') { }
634 3 1 defined $_[0] ? :
644 4 0 if ($terminal_command eq "")
655 0 0 if ($terminal_name =~ /^sshd.*/) { }
0 0 elsif ($terminal_name =~ /^login.*/) { }
661 0 0 if ($flag eq '') { }
0 0 elsif ($flag eq 'FTN') { }
0 0 elsif ($flag eq 'PATH') { }
0 0 elsif ($flag eq 'PROC') { }