, 'owner_is with numeric UID' );
owner_isnt( $filename, $other_name, 'owner_isnt with text username' );
owner_isnt( $filename, $other_uid, 'owner_isnt with numeric UID' );
my $name = 'Intent
t_test( $name );
$name = 'owner_isnt for non-existent name';
$testname = "$filename doesn't belong to $invalid_user_name";
test_out( "ok 1 - $testname");
owner_isnt( $filename, $invalid_user_name );
test_test( $name );
$name = 'Intentional owner_isnt failure';
$testname = "$filename doesn't belong to $owner_name";
test_out( "not ok 1 - $testname");
test_diag(
"file [$filename] belongs to $own
ting();
};
subtest mode_isnt => sub {
if (Test::File::_win32) {
test_out( "ok 1 # skip file_mode_isnt doesn't work on Windows" );
test_out( "ok 2 # skip file_mode_isnt doesn't work on Windows"
);
test_out( "ok 3 # skip file_mode_isnt doesn't work on Windows" );
}
else {
test_out( "ok 1 - executable mode is not 0200" );
test_out( "ok 2 - executable mode really is not 0200" );
test
" . (__LINE__+4) . ".");
}
file_mode_isnt( 'executable', 0200 );
file_mode_isnt( 'executable', 0200, 'executable mode really is not 0200' );
file_mode_isnt( 'executable', 0100 );
test_test();
d
subs_defined => sub {
my @subs = qw( file_line_count_between file_line_count_is file_line_count_isnt );
foreach my $sub ( @subs ) {
no strict 'refs';
ok( defined &{$sub}, "$sub is defined" );
s );
test_test();
test_out( "ok 1 - $file line count is not $linesp lines" );
file_line_count_isnt( $file, $linesp );
test_test();
done_testing();
};
subtest missing_file => sub {
my $missing
ount is not $lines lines'\n" .
" # at $0 line " . line_num(+5) . "."
);
file_line_count_isnt( $missing, $lines );
test_test();
done_testing();
};
subtest missing_line_count => sub {
my
module );
my $file = '/foo/bar/baz';
my $normalized = Test::File::_normalize( $file );
isnt( $normalized, $file, "Normalize gives different path for Win32" );
is( $normalized, '\foo\bar\
module );
my $file = '/foo/bar/baz';
my $normalized = Test::File::_normalize( $file );
isnt( $normalized, $file, "Normalize gives different path for Mac" );
is( $normalized, 'foo:bar:baz',
};
subtest file_modes => sub {
local $^O = 'Win32';
my @subs = qw(
file_mode_is file_mode_isnt
file_executable_ok file_not_executable_ok
);
foreach my $sub ( @subs ) {
no strict 'refs'