Apache-PAR

 view release on metacpan or  search on metacpan

t/00par.t  view on Meta::CPAN

my $log_contents = '';

open my $fh, 't/error_log' or die "Unable to open error_log, aborting.";
{
	local $/;
	$log_contents=<$fh>;
}
close $fh;
ok( ($log_contents =~ /\Q$bad_file_msg\E$/m) ? 1 : 0);
# This should be fixed, since we dont actually have the script name expected
ok( ($log_contents =~ /^\Q$no_par_file_msg\E.*?not_found.par$/m) ? 1 : 0);
ok( ($log_contents =~ /^\Q$no_par_dir_msg\E.*?not_dir$/m) ? 1 : 0);

t/00perlrun.t  view on Meta::CPAN

	if(!$response->is_success) {
		ok(0);
		print STDERR "Received failure code: " . $response->code . "\n";
	}
	else {
		ok t_cmp('/JAPH', $response->content);
	}
}

# Test bad request (not found)
my $response = GET '/test/perlrun/test/not_found.pl';
if($response->is_success) {
	ok(0);
	print STDERR "Should have failed, instead received: " . $response->code . "\n";
}
else {
	if($response->code != 404) {
		ok(0);
		print STDERR "Should have gotten file not found, instead received: " . $response->code . "\n";
	}
	else {

t/00registry.t  view on Meta::CPAN

		ok(0);
		print STDERR "Received failure code: " . $response->code . "\n";
	}
	else {
		ok t_cmp('/JAPH', $response->content);
	}
}


# Test bad request (not found)
my $response = GET '/test/registry/test/not_found.pl';
if($response->is_success) {
	ok(0);
	print STDERR "Should have failed, instead received: " . $response->code . "\n";
}
else {
	if($response->code != 404) {
		ok(0);
		print STDERR "Should have gotten file not found, instead received: " . $response->code . "\n";
	}
	else {

t/conf/extra.conf.in  view on Meta::CPAN


Alias /test/static2/ @ServerRoot@/par/static.par/
<Location /test/static2>
SetHandler perl-script
PerlHandler Apache::PAR::Static
PerlSetVar PARStaticFilesPath /
</Location>

# Need to finish these tests
#PerlAddVar PARFile @ServerRoot@/par/bad.par
#PerlAddVar PARFile @ServerRoot@/par/not_found.par
#PerlAddVar PARDir @ServerRoot@/par/not_dir/

# This is done in the modperl_extra.pl file for Win32 compat
#PerlModule Apache::PAR

<IfDefine MODPERL2>
PerlRequire @ServerRoot@/conf/modperl_2.pl
</IfDefine>

<IfDefine !MODPERL2>
# FIXME This will break testing on mod_perl 1.x on Win32



( run in 0.803 second using v1.01-cache-2.11-cpan-cc502c75498 )