# Test for File::Temp - Security levels
# Some of the security checking will not work on all platforms
# Test a simple open in the cwd and tmpdir foreach of the
# security levels
use Test;
use strict;
# Set up END block - this needs to happen before we load
# File::Temp since this END block must be evaluated after the
# END block configured by File::Temp
my @files; # list of files to remove
# The high security tests must currently be skipped on some platforms
# No sticky bits.
$^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'os2' || $^O eq 'dos' || $^O eq 'mpeix' || $^O eq 'MacOS'
) ? 1 : 0 );
# Can not run high security tests in perls before 5.6.0
# Determine whether we need to skip things and why
my $skip = 0;
}
# start off with basic checking
print "# Testing with STANDARD security...\n";
# Try medium
print "# Testing with MEDIUM security...\n";
# Now we need to start skipping tests
# Try HIGH
print "# Testing with HIGH security...\n";
exit;
# Subroutine to open two temporary files.
# one is opened in the current dir and the other in the temp dir
sub test_security {
# Read in the skip flag
my $skip = shift;
# If we are skipping we need to simply fake the correct number
# of tests -- we dont use skip since the tempfile() commands will
# plus we need an end block so the tests come out in the right order
return;
}
# Create the tempfile
UNLINK => 1,
);
};
"See INSTALL under 'make test'";
# plus we need an end block so the tests come out in the right order
} else {
}
# Explicitly
return;
}
"See INSTALL under 'make test'";
# plus we need an end block so the tests come out in the right order
} else {
}
}