CGI-Lite

 view release on metacpan or  search on metacpan

t/uploads.t  view on Meta::CPAN


is ($cgi->set_directory ('/srhslgvsgnlsenhglsgslvngh'), 0,
	'Set directory (non-existant)');

my $testdir = 'testperms';
mkdir $testdir, 0400;
SKIP: {
	skip "subdir '$testdir' could not be created", 3 unless (-d $testdir);

	# See http://www.perlmonks.org/?node_id=587550 for a discussion of
	# the futility of chmod and friends on MS Windows systems.
	SKIP: {
		skip "Not available on $^O", 2 if ($^O eq 'MSWin32' or $^O eq 'cygwin');
		skip "Running as privileged user: $ENV{USER}", 2 unless $>;
		is ($cgi->set_directory ($testdir), 0, 'Set directory (unwriteable)');
		chmod 0200, $testdir;
		is ($cgi->set_directory ($testdir), 0, 'Set directory (unreadable)');
	}
	rmdir $testdir and open my $td, '>', $testdir;
	print $td "Test\n";
	close $td;
	is ($cgi->set_directory ($testdir), 0, 'Set directory (non-directory)');
	unlink $testdir;
}

# Mime type tests



( run in 0.235 second using v1.01-cache-2.11-cpan-496ff517765 )