Branch Coverage

blib/lib/Test/Unix/User.pm
Criterion Covered Total %
branch 34 54 62.9


line true false branch
113 0 0 unless _check_spec(@_)
117 0 0 unless (defined $test_name)
126 0 0 unless (defined $u)
133 0 0 unless (exists $USER_FIELDS{$field})
138 0 0 if (not defined $$spec{$field} or $$spec{$field} =~ /^\s*$/)
143 0 0 if ($u->$field ne $$spec{$field})
150 0 0 if (@diag)
185 1 14 unless _check_spec(@_)
189 13 1 unless (defined $test_name)
197 1 29 unless (exists $HDIR_FIELDS{$field})
203 2 27 if (not defined $$spec{$field} or $$spec{$field} =~ /^\s*$/)
212 1 13 unless (defined $u)
218 1 12 unless (-d $u->dir)
227 6 18 if (exists $$spec{$field})
228 1 5 if ($sb->$field != $$spec{$field})
236 2 10 if (exists $$spec{'owner'})
238 1 1 if ($$spec{'owner'} ne $owner)
245 2 10 if (exists $$spec{'group'})
247 1 1 if ($$spec{'group'} ne $group)
254 3 9 if (exists $$spec{'perm'})
255 1 2 if (($sb->mode & 4095) != $$spec{'perm'})
262 7 5 if (@diag)
277 1 14 unless (defined $spec)
283 0 14 if (ref $spec ne 'HASH')
285 0 0 unless defined $t
291 0 14 if (not exists $$spec{'name'} && defined $$spec{'name'} or $$spec{'name'} =~ /^\s*$/)
295 0 0 unless defined $t