Condition Coverage

blib/lib/Unix/Passwd/File.pm
Criterion Covered Total %
condition 183 216 84.7


and 3 conditions

line !l l&&!r l&&r condition
320 0 0 2 $args{'_read_shadow'} == 2 and not $args{'_write_shadow'}
376 0 0 2 $args{'_read_gshadow'} == 2 and not $args{'_write_gshadow'}
433 15 1 12 $args{'_write_shadow'} and $stash{'write_shadow'} // 1
447 15 1 12 $args{'_write_passwd'} and $stash{'write_passwd'} // 1
461 6 1 21 $args{'_write_gshadow'} and $stash{'write_gshadow'} // 1
475 3 2 23 $args{'_write_group'} and $stash{'write_group'} // 1
496 44 28 23 $e and $e->[0] != 200
497 44 28 23 $e and $e->[0] != 200
619 8 40 8 defined $user and $passwd->[-1][0] eq $user
40 7 1 defined $uid and $passwd->[-1][2] == $uid
778 9 82 15 defined $gn and $group->[-1][0] eq $gn
82 8 1 defined $gid and $group->[-1][2] == $gid
1084 5 2 0 $members and ref $members eq 'ARRAY'
1145 10 5 1 $which eq 'group' and $cur_g
1349 16 1 1 defined $args{'uid'} and not $args{'uid'} =~ /$re_posint/o
1351 15 1 1 defined $args{'gid'} and not $args{'gid'} =~ /$re_posint/o
1353 14 1 1 defined $args{'gecos'} and not $args{'gecos'} =~ /$re_field/o
1355 13 1 1 defined $args{'home'} and not $args{'home'} =~ /$re_field/o
1357 12 1 1 defined $args{'shell'} and not $args{'shell'} =~ /$re_field/o
1363 8 3 2 defined $args{'encpass'} and not $args{'encpass'} =~ /$re_field/o
1365 9 1 1 defined $args{'last_pwchange'} and not $args{'last_pwchange'} =~ /$re_posint/o
1367 8 1 1 defined $args{'min_pass_age'} and not $args{'min_pass_age'} =~ /$re_posint/o
1369 7 1 1 defined $args{'max_pass_age'} and not $args{'max_pass_age'} =~ /$re_posint/o
1371 6 1 1 defined $args{'pass_warn_period'} and not $args{'pass_warn_period'} =~ /$re_posint/o
1373 5 1 1 defined $args{'pass_inactive_period'} and not $args{'pass_inactive_period'} =~ /$re_posint/o
1376 4 1 1 defined $args{'expire_date'} and not $args{'expire_date'} =~ /$re_posint/o
1382 11 1 1 defined $args{'gid'} and not $args{'gid'} =~ /$re_posint/o
1388 10 1 1 defined $args{'encpass'} and not $args{'encpass'} =~ /$re_field/o
1683 10 0 2 $l->[0] ~~ $add and not $user ~~ \@mm
1687 11 0 1 $l->[0] ~~ $del and $user ~~ \@mm
1748 3 1 2 $l->[0] ~~ $gg and not $user ~~ \@mm
1752 3 2 1 not $l->[0] ~~ $gg and $user ~~ \@mm

or 2 conditions

line l !l condition
295 95 0 $args{'etc_dir'} // '/etc'
297 57 38 $args{'with_field_names'} // 1
433 1 12 $stash{'write_shadow'} // 1
440 594 0 $_ // ''
447 1 12 $stash{'write_passwd'} // 1
454 462 0 $_ // ''
461 1 21 $stash{'write_gshadow'} // 1
468 540 0 $_ // ''
475 2 23 $stash{'write_group'} // 1
482 588 0 $_ // ''
498 95 0 $stash{'res'} //= [500, 'BUG: res not set']
600 0 16 $args{'with_field_names'} // 1
759 0 23 $args{'with_field_names'} // 1
1079 2 21 $args{'min_gid'} // 1000
1080 2 21 $args{'max_gid'} // 65535
1087 2 5 $members //= ''
1100 2 14 $args{'min_uid'} // 1000
1101 2 14 $args{'max_uid'} // 65535
1103 1 15 $args{'pass'} // ''
1106 1 15 $args{'gecos'} // ''
1109 7 8 $args{'home'} // ''
1112 7 7 $args{'shell'} // ''
1119 0 12 $args{'min_pass_age'} // 0
1120 0 12 $args{'max_pass_age'} // 99999
1121 0 12 $args{'max_pass_age'} // 7
1122 1 11 $args{'pass_inactive_period'} // ''
1125 1 10 $args{'expire_date'} // ''
1666 2 0 $args{'add_to'} // []
1667 2 0 $args{'delete_from'} // []

or 3 conditions

line l !l&&r !l&&!r condition
317 19 18 58 $args{'_read_shadow'} or $args{'_write_shadow'}
345 29 18 48 $args{'_read_passwd'} or $args{'_write_passwd'}
373 26 30 29 $args{'_read_gshadow'} or $args{'_write_gshadow'}
401 37 33 15 $args{'_read_group'} or $args{'_write_group'}
496 0 23 0 $stash{'res'} //= $e
497 23 0 0 $stash{'res'} //= $e
529 1 1 2 $args{'with_field_names'} // ($detail ? 1 : 0)
619 8 1 47 defined $user and $passwd->[-1][0] eq $user or defined $uid and $passwd->[-1][2] == $uid
689 1 1 3 $args{'with_field_names'} // ($detail ? 1 : 0)
778 15 1 90 defined $gn and $group->[-1][0] eq $gn or defined $gid and $group->[-1][2] == $gid
817 1 1 2 $args{'with_field_names'} // ($detail ? 1 : 0)
929 0 0 5 $args{'with_field_names'} // ($detail ? 1 : 0)
950 10 0 14 $user ~~ \@mm or $group->[$i][0] eq $user
1070 3 13 0 $args{'group'} // $user
1073 16 8 1 $gn //= $args{'group'}
1115 1 12 0 $args{'encpass'} // ($pass eq '' ? '*' : _enc_pass($pass))
1118 1 11 0 $args{'last_pwchange'} // time / 86400
1803 3 2 0 $gn //= $args{'group'}

xor 4 conditions

line l&&r l&&!r !l&&r !l&&!r condition
603 1 13 2 0 defined $user xor defined $uid
762 1 20 2 0 defined $gn xor defined $gid