File: closure.t

package info (click to toggle)
libapache-asp-perl 2.63-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 4,120 kB
  • sloc: perl: 6,044; php: 409; sh: 62; lisp: 22; makefile: 10
file content (28 lines) | stat: -rw-r--r-- 710 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use Apache::ASP::CGI;

use strict;
use vars qw($Temp);

$^W = 1;
$main::Temp = 0;
&Apache::ASP::CGI::do_self(UseStrict => 1, NoState => 1, Debug => 1);

__END__
<% 

eval { $Response->Include('closure.inc'); };
my $error = $@;
$t->eok($error, "include error");
$t->eok($error =~ /not stay shared/is ? 1 : 0, "not stay shared error");

# this part is to test that script with named subroutines do
# no get cached so the perl compilation will increment
$^W = 0;
my $ASP = $Server->{asp};
$Response->TrapInclude('closure.inc');
$t->eok($ASP->{compile_perl_count} == 3, $ASP->{compile_perl_count});
$Response->TrapInclude('closure.inc');
$t->eok($ASP->{compile_perl_count} == 4, $ASP->{compile_perl_count});

%>