richter 00/11/15 00:15:42
Modified: . Changes.pod Embperl.pm Embperl.pod EmbperlD.pod
Faq.pod INSTALL.pod MANIFEST TODO embperl.h epcmd.c
eputil.c test.pl
test/conf httpd.conf.src
Added: test/cmp heredoc.htm
test/html heredoc.htm
Log:
- Carridge Returns are only removed for Perl 5.004. This makes using of
HERE documents possible on Perl 5.005+, even if the documents has CRLF
as lineendings.
Revision Changes Path
1.142 +5 -1 embperl/Changes.pod
Index: Changes.pod
===================================================================
RCS file: /home/cvs/embperl/Changes.pod,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -r1.141 -r1.142
--- Changes.pod 2000/11/13 05:43:54 1.141
+++ Changes.pod 2000/11/15 08:15:39 1.142
@@ -38,7 +38,11 @@
seems to be due to problems of mod_perl's enironment handling.
- Droped support for Apache::Session 0.17. Embperl now support only
Apache::Session 1.00 and higher.
-
+ - Added new option: optDisableSelectScan, to allow processing of SELECT tags,
+ while processing of TABLE tags is disabled. Suggested by Robert.
+ - Carridge Returns are only removed for Perl 5.004. This makes using of
+ HERE documents possible on Perl 5.005+, even if the documents has CRLF
+ as lineendings.
=head1 1.3b6 (BETA) 18. Oct 2000
1.132 +2 -1 embperl/Embperl.pm
Index: Embperl.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl.pm,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -r1.131 -r1.132
--- Embperl.pm 2000/11/13 05:43:54 1.131
+++ Embperl.pm 2000/11/15 08:15:40 1.132
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: Embperl.pm,v 1.131 2000/11/13 05:43:54 richter Exp $
+# $Id: Embperl.pm,v 1.132 2000/11/15 08:15:40 richter Exp $
#
###################################################################################
@@ -170,6 +170,7 @@
use constant optDisableInputScan => 1024 ;
use constant optDisableMetaScan => 4096 ;
use constant optDisableTableScan => 2048 ;
+use constant optDisableSelectScan => 0x800000 ;
use constant optDisableVarCleanup => 1 ;
use constant optEarlyHttpHeader => 64 ;
use constant optOpcodeMask => 8 ;
1.63 +5 -1 embperl/Embperl.pod
Index: Embperl.pod
===================================================================
RCS file: /home/cvs/embperl/Embperl.pod,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- Embperl.pod 2000/11/14 10:34:40 1.62
+++ Embperl.pod 2000/11/15 08:15:40 1.63
@@ -634,7 +634,11 @@
=item optDisableTableScan = 2048
-Disables processing of all table-related tags.
(<TABLE><TH><TR><TD><MENU><OL><SELECT><UL>)
+Disables processing of all table-related tags. (<TABLE><TH><TR><TD><MENU><OL><UL>)
+
+=item optDisableSelectScan = 8388608 (0x800000) (only 1.3b7 and above)
+
+Disables processing of the SELECT tag. (<SELECT>)
=item optDisableMetaScan = 4096
1.36 +5 -1 embperl/EmbperlD.pod
Index: EmbperlD.pod
===================================================================
RCS file: /home/cvs/embperl/EmbperlD.pod,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- EmbperlD.pod 2000/11/14 10:34:40 1.35
+++ EmbperlD.pod 2000/11/15 08:15:40 1.36
@@ -577,7 +577,11 @@
=item optDisableTableScan = 2048
-Verhindert die Bearbeitung aller Tabellen Tags.
(<TABLE><TH><TR><TD><MENU><OL><SELECT><UL>)
+Verhindert die Bearbeitung aller Tabellen Tags. (<TABLE><TH><TR><TD><MENU><OL><UL>)
+
+=item optDisableSelectScan = 8388608 (0x800000) (ab 1.3b7)
+
+Verhindert die Bearbeitung aller SELECT Tags. (<SELECT>)
=item optDisableMetaScan = 4096
1.18 +27 -0 embperl/Faq.pod
Index: Faq.pod
===================================================================
RCS file: /home/cvs/embperl/Faq.pod,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- Faq.pod 2000/09/14 04:57:31 1.17
+++ Faq.pod 2000/11/15 08:15:40 1.18
@@ -683,7 +683,34 @@
automatically set the http header to be the same as the META HTTP-EQUIV.
+=head2 I get "Stack underflow"
+The problem often occurs, when you have a <table> tag in one file and a </table>
+tag in another file and you both include them in a main page (e.g. as header
+and footer). There are two workarounds for this problem:
+
+=over 4
+
+=item 1. Set optDisableTableScan
+
+This will avoid that Embperl takes any action on tables. You can disable/enable
+this (also multiple times) inside the page with
+
+ [- $optDisableTableScan = 1 -]
+
+If you put this at the top of your header/footer which you include with Execute,
+then the main page will still process dynamic tables.
+
+=item 2. Add a <table> as comment
+
+Add the following to the top of
+the footer document:
+
+ <!-- <table><tr><td> -->
+
+This will work also, because Embperl (1.x) will not scan for html comments
+
+=back
=head1 Common Questions
1.14 +4 -2 embperl/INSTALL.pod
Index: INSTALL.pod
===================================================================
RCS file: /home/cvs/embperl/INSTALL.pod,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- INSTALL.pod 2000/09/14 04:57:31 1.13
+++ INSTALL.pod 2000/11/15 08:15:40 1.14
@@ -22,7 +22,8 @@
- B<make install>
B<NOTE 1:> (only Embperl-1.2b1 or higher) For using session handling you need
-Apache::Session-0.17 or higher. If possible use Apache::Session 1.52 or higher.
+Apache::Session-1.00 or higher. If possible use Apache::Session 1.52 or higher.
+Starting with Embperl 1.3b7 Apache::Session 0.17 is B<NOT> supported anymore.
B<NOTE 2:> I<Embperl> runs without additional Perl modules, but the C<make test>
needs the following modules to work:
@@ -107,7 +108,8 @@
B<nmake install>
B<NOTE 1:> (only Embperl-1.2b1 or higher) For using session handling you need
-Apache::Session-0.17 or higher. If possible use Apache::Session 1.52 or higher.
+Apache::Session-1.00 or higher. If possible use Apache::Session 1.52 or higher.
+Starting with Embperl 1.3b7 Apache::Session 0.17 is B<NOT> supported anymore.
B<NOTE 2:> I<Embperl> runs without additional Perl modules, but the C<make test>
needs the following modules to work:
1.56 +2 -0 embperl/MANIFEST
Index: MANIFEST
===================================================================
RCS file: /home/cvs/embperl/MANIFEST,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- MANIFEST 2000/11/10 08:36:37 1.55
+++ MANIFEST 2000/11/15 08:15:40 1.56
@@ -84,6 +84,7 @@
test/html/hidden.htm
test/html/java.htm
test/html/inputjava.htm
+test/html/heredoc.htm
test/html/tagscan.htm
test/html/tagscandisable.htm
test/html/inc.htm
@@ -227,6 +228,7 @@
test/cmp/exit.htm
test/cmp/exit2.htm
test/cmp/exit3.htm
+test/cmp/heredoc.htm
test/cmp/post.htm
test/cmp/upload.htm
test/cmp/npherr.htm
1.102 +0 -2 embperl/TODO
Index: TODO
===================================================================
RCS file: /home/cvs/embperl/TODO,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -r1.101 -r1.102
--- TODO 2000/11/07 11:28:19 1.101
+++ TODO 2000/11/15 08:15:40 1.102
@@ -60,8 +60,6 @@
- accpect \0 as separator for multiple with same name in %fdat (as CGI->Vars)
[Ilia Lobsanov 8.4.00]
-- optDisableSelectScan [ Robert 14.5.00]
-
- Execute backtrace [Jon Brisbin 12.8.00]
- pre header function [Alvar Freude 25.10.00]
1.23 +2 -1 embperl/embperl.h
Index: embperl.h
===================================================================
RCS file: /home/cvs/embperl/embperl.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- embperl.h 2000/11/07 11:28:19 1.22
+++ embperl.h 2000/11/15 08:15:41 1.23
@@ -139,7 +139,8 @@
optKeepSrcInMemory = 0x80000,
optKeepSpaces = 0x100000,
optOpenLogEarly = 0x200000,
- optNoUncloseWarn = 0x400000
+ optNoUncloseWarn = 0x400000,
+ optDisableSelectScan = 0x800000
} ;
/*
1.39 +2 -2 embperl/epcmd.c
Index: epcmd.c
===================================================================
RCS file: /home/cvs/embperl/epcmd.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- epcmd.c 2000/10/17 07:02:02 1.38
+++ epcmd.c 2000/11/15 08:15:41 1.39
@@ -94,7 +94,7 @@
{ "/dl", HtmlEndtable, 0, 1, cmdTable, 0, 0, cnDl ,
optDisableTableScan, 1 } ,
{ "/menu", HtmlEndtable, 0, 1, cmdTable, 0, 0, cnMenu ,
optDisableTableScan, 1 } ,
{ "/ol", HtmlEndtable, 0, 1, cmdTable, 0, 0, cnOl ,
optDisableTableScan, 1 } ,
- { "/select", HtmlEndtable, 0, 1, cmdTable, 0, 0, cnSelect ,
optDisableTableScan, 1 } ,
+ { "/select", HtmlEndtable, 0, 1, cmdTable, 0, 0, cnSelect ,
optDisableSelectScan, 1 } ,
{ "/table", HtmlEndtable, 0, 1, cmdTable, 0, 0, cnTable ,
optDisableTableScan, 1 } ,
{ "/textarea", HtmlEndtextarea, 0, 1, cmdTextarea, 0, 0, cnNop ,
optDisableInputScan, 1 } ,
{ "/tr", HtmlEndrow, 0, 1, cmdTablerow, 0, 0, cnTr ,
optDisableTableScan, 1 } ,
@@ -124,7 +124,7 @@
{ "meta", HtmlMeta, 0, 0, cmdNorm, 1, 0, cnNop ,
optDisableMetaScan , 1 } ,
{ "ol", HtmlTable, 1, 0, cmdTable, 1, 0, cnOl ,
optDisableTableScan, 1 } ,
{ "option", HtmlOption, 0, 0, cmdNorm, 1, 0, cnNop ,
optDisableInputScan, 1 } ,
- { "select", HtmlSelect, 1, 0, cmdTable, 1, 0, cnSelect ,
optDisableTableScan, 1 } ,
+ { "select", HtmlSelect, 1, 0, cmdTable, 1, 0, cnSelect ,
optDisableSelectScan, 1 } ,
{ "sub", CmdSub, 1, 0, cmdSub, 0, 0, cnNop , 0
, 0 } ,
{ "table", HtmlTable, 1, 0, cmdTable, 1, 0, cnTable ,
optDisableTableScan, 1 } ,
{ "textarea", HtmlTextarea, 1, 0, cmdTextarea, 1, 1, cnNop ,
optDisableInputScan, 1 } ,
1.16 +19 -11 embperl/eputil.c
Index: eputil.c
===================================================================
RCS file: /home/cvs/embperl/eputil.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- eputil.c 2000/09/12 12:49:49 1.15
+++ eputil.c 2000/11/15 08:15:41 1.16
@@ -257,14 +257,19 @@
EPENTRY (TransHtml) ;
if (r -> bOptions & optRawInput)
- { /* Just remove CR for raw input */
- while (*p != '\0')
+ {
+#if PERL_VERSION < 5
+ /* Just remove CR for raw input for perl 5.004 */
+ if (nLen == 0)
+ nLen = strlen (sData) ;
+ e = sData + nLen ;
+ while (p < e)
{
if (*p == '\r')
*p = ' ' ;
p++ ;
}
-
+#endif
return nLen ;
}
@@ -273,7 +278,7 @@
nLen = strlen (sData) ;
e = sData + nLen ;
- while (*p && p < e)
+ while (p < e)
{
if (*p == '\\')
{
@@ -283,7 +288,7 @@
memmove (p, p + 1, e - p - 1) ;
e[-1] = ' ' ;
p++ ;
- while (*p && *p != '>')
+ while (p < e && *p != '>')
p++ ;
}
else if (p[1] == '&')
@@ -291,7 +296,7 @@
memmove (p, p + 1, e - p - 1) ;
e[-1] = ' ' ;
p++ ;
- while (*p && *p != ';')
+ while (p < e && *p != ';')
p++ ;
}
else if (bInUrl && p[1] == '%')
@@ -303,19 +308,22 @@
else
p++ ; /* Nothing to quote */
}
+#if PERL_VERSION < 5
+ /* remove CR for perl 5.004 */
else if (*p == '\r')
{
*p++ = ' ' ;
}
+#endif
else
{
if (p[0] == '<' && (isalpha (p[1]) || p[1] == '/'))
{ /* count HTML tag length */
s = p ;
p++ ;
- while (*p && *p != '>')
+ while (p < e && *p != '>')
p++ ;
- if (*p)
+ if (p < e)
p++ ;
else
{ /* missing left '>' -> no html tag */
@@ -327,10 +335,10 @@
{ /* count HTML char length */
s = p ;
p++ ;
- while (*p && *p != ';')
+ while (p < e && *p != ';')
p++ ;
- if (*p)
+ if (p < e)
{
*p = '\0' ;
p++ ;
@@ -367,7 +375,7 @@
s = NULL ;
}
else
- if (*p)
+ if (p < e)
p++ ;
}
}
1.85 +263 -20 embperl/test.pl
Index: test.pl
===================================================================
RCS file: /home/cvs/embperl/test.pl,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- test.pl 2000/11/10 08:36:37 1.84
+++ test.pl 2000/11/15 08:15:41 1.85
@@ -144,6 +144,7 @@
},
'java.htm' => { },
'inputjava.htm' => { },
+ 'heredoc.htm' => { },
'post.htm' => {
'offline' => 0,
},
@@ -465,7 +466,7 @@
$opt_offline $opt_ep1 $opt_cgi $opt_modperl $opt_execute $opt_nokill
$opt_loop
$opt_multchild $opt_memcheck $opt_exitonmem $opt_exitonsv $opt_config
$opt_nostart $opt_uniquefn
$opt_quite $opt_ignoreerror $opt_tests $opt_blib $opt_help
$opt_dbgbreak $opt_finderr
- $opt_ddd $opt_gdb $opt_ab $opt_start $opt_kill $opt_showcookie) ;
+ $opt_ddd $opt_gdb $opt_ab $opt_start $opt_kill $opt_showcookie
$opt_cache) ;
{
local $^W = 0 ;
@@ -537,7 +538,7 @@
eval { Getopt::Long::Configure ('bundling') } ;
$@ = "" ;
-$ret = GetOptions ("offline|o", "ep1|1", "cgi|c", "modperl|httpd|h", "execute|e",
"nokill|r", "loop|l:i",
+$ret = GetOptions ("offline|o", "ep1|1", "cgi|c", "cache|a", "modperl|httpd|h",
"execute|e", "nokill|r", "loop|l:i",
"multchild|m", "memcheck|v", "exitonmem|g", "exitonsv", "config|f=s",
"nostart|x", "uniquefn|u",
"quite|q", "ignoreerror|i", "tests|t", "blib|b", "help", "dbgbreak",
"finderr",
"ddd", "gdb", "ab:s", "start", "kill", "showcookie") ;
@@ -591,6 +592,7 @@
print "-c test cgi\n" ;
print "-h test mod_perl\n" ;
print "-e test execute\n" ;
+ print "-a test output cache\n" ;
print "-r don't kill httpd at end of test\n" ;
print "-l loop forever\n" ;
print "-m start httpd with mulitple childs\n" ;
@@ -643,6 +645,10 @@
$vmhttpdsize = 0 ;
$vmhttpdinitsize = 0 ;
+#####################################################
+
+sub s1 { 1 } ;
+sub s0 { 0 } ;
#####################################################
@@ -666,6 +672,30 @@
#####################################################
+sub CmpInMem
+
+ {
+
+ my ($out, $cmp, $parm) = @_ ;
+
+ local $p = $parm ;
+
+ $out =~ s/\r//g ;
+ chomp ($out) ;
+
+ if ($out ne eval ($cmp))
+ {
+ print "\nError\nIs:\t>$out<\nShould:\t>" . eval ($cmp) . "<\n" ;
+ return 1 ;
+ }
+
+ return 0 ;
+ }
+
+
+
+#####################################################
+
sub CmpFiles
{
my ($f1, $f2, $errin) = @_ ;
@@ -980,16 +1010,16 @@
#### check commandline options #####
-if (!$opt_modperl && !$opt_cgi && !$opt_offline && !$opt_execute)
+if (!$opt_modperl && !$opt_cgi && !$opt_offline && !$opt_execute && !$opt_cache)
{
if (defined ($opt_ab))
{
$opt_modperl = 1 ;
}
elsif ($EPHTTPD ne '')
- { $opt_modperl = $opt_cgi = $opt_offline = $opt_execute = 1 }
+ { $opt_cache = $opt_modperl = $opt_cgi = $opt_offline = $opt_execute = 1 }
else
- { $opt_offline = $opt_execute = 1 }
+ { $opt_cache = $opt_offline = $opt_execute = 1 }
$opt_ep1 = 1 ;
}
@@ -1066,6 +1096,7 @@
%seen = () ;
$max_sv = 0 ;
$version = $EP2?2:1 ;
+$frommem = 0 ;
$cp = HTML::Embperl::AddCompartment ('TEST') ;
@@ -1075,6 +1106,13 @@
do
{
+ if ($opt_offline || $opt_execute || $opt_cache)
+ {
+ open (SAVEERR, ">&STDERR") || die "Cannot save stderr" ;
+ open (STDERR, ">$offlineerr") || die "Cannot redirect stderr" ;
+ open (ERR, "$offlineerr") || die "Cannot open redirected stderr
($offlineerr)" ; ;
+ }
+
#############
#
# OFFLINE
@@ -1085,13 +1123,6 @@
{
print "\nTesting offline mode...\n\n" ;
- if ($loopcnt == 0)
- {
- open (SAVEERR, ">&STDERR") || die "Cannot save stderr" ;
- open (STDERR, ">$offlineerr") || die "Cannot redirect stderr" ;
- open (ERR, "$offlineerr") || die "Cannot open redirected stderr
($offlineerr)" ; ;
- }
-
$n = 0 ;
$t_offline = 0 ;
$n_offline = 0 ;
@@ -1391,8 +1422,217 @@
}
}
- if ((($opt_execute) || ($opt_offline)) && $looptest == 0)
+ if ($EP2)
{
+ #############
+ #
+ # Cache tests
+ #
+ #############
+
+ $frommem = 1 ;
+ if ($err == 0)
+ {
+ print "\nTesting Ouput Caching...\n\n" ;
+
+ HTML::Embperl::Init ($logfile, $defaultdebug) ;
+
+ my $src = '* [+ $param[0] +] *' ;
+ my $cmp = '"* $p *"' ;
+ my $out ;
+
+ @cachetests = (
+ {
+ text => 'No cache 1',
+ param => { param => [1], },
+ 'cmp' => 1,
+ },
+ {
+ text => 'No cache 2',
+ param => { param => [2], },
+ 'cmp' => 2,
+ },
+ {
+ text => 'Expires in 1 sec',
+ param => { param => [3], expires_in => 1, },
+ 'cmp' => 3,
+ },
+ {
+ text => 'Expires in 1 sec (cached)',
+ param => { param => ['not cached'], expires_in => 1, },
+ 'cmp' => 3,
+ },
+ {
+ text => 'Wait for expire',
+ 'sleep' => 2,
+ },
+ {
+ text => 'Expires in 1 sec (reexec)',
+ param => { param => ['reexec'], expires_in => 1, },
+ 'cmp' => 'reexec',
+ },
+ {
+ text => 'Expires function',
+ param => { param => [4], expires_func => sub { 1 } },
+ 'cmp' => 4,
+ },
+ {
+ text => 'Expires function (cached)',
+ param => { param => ['not cached func'], expires_func => sub {
0 } },
+ 'cmp' => 4,
+ },
+ {
+ text => 'Expires function (reexec)',
+ param => { param => ['reexec func'], expires_func => sub { 1 },
},
+ 'cmp' => 'reexec func',
+ },
+ {
+ text => 'Expires string function (cached)',
+ param => { param => ['not cached string func'], expires_func =>
'sub { 0 }' },
+ 'cmp' => 'reexec func',
+ },
+ {
+ text => 'Expires string function (reexec)',
+ param => { param => ['reexec string func'], expires_func =>
'sub { 1 }', },
+ 'cmp' => 'reexec string func',
+ },
+ {
+ text => 'Expires named function (cached)',
+ param => { param => ['not cached named func'], expires_func =>
'main::s0' },
+ 'cmp' => 'reexec string func',
+ },
+ {
+ text => 'Expires named function (reexec)',
+ param => { param => ['reexec named func'], expires_func =>
'main::s1', },
+ 'cmp' => 'reexec named func',
+ },
+ {
+ text => 'Change query_info',
+ param => { param => ['query_info'], expires_func => 'main::s0'
},
+ query_info => 'qi',
+ 'cmp' => 'query_info',
+ },
+ {
+ text => 'Change query_info (cached)',
+ param => { param => ['not cached query_info'], expires_func =>
'main::s0' },
+ query_info => 'qi',
+ 'cmp' => 'query_info',
+ },
+ {
+ text => 'Expires named function (cached)',
+ param => { param => ['not cached named func query_info'],
expires_func => 'main::s0' },
+ 'cmp' => 'reexec named func',
+ },
+ {
+ text => 'Change query_info (reexec)',
+ param => { param => ['reexec query_info'], expires_func =>
'main::s1' },
+ query_info => 'qi',
+ 'cmp' => 'reexec query_info',
+ },
+ {
+ text => 'Expires named function (cached)',
+ param => { param => ['not cached named func query_info'],
expires_func => 'main::s0' },
+ 'cmp' => 'reexec named func',
+ },
+ {
+ text => 'Change query_info (cached)',
+ param => { param => ['not cached reexec query_info 2'],
expires_func => 'main::s0' },
+ query_info => 'qi',
+ 'cmp' => 'reexec query_info',
+ },
+ {
+ text => 'Modify source',
+ param => { param => ['mod'], expires_func => 'main::s0' },
+ mtime => 2,
+ 'cmp' => 'mod',
+ },
+
+ {
+ text => 'Modify source query_info',
+ param => { param => ['mod query_info'], expires_func =>
'main::s0' },
+ query_info => 'qi',
+ mtime => 2,
+ 'cmp' => 'mod query_info',
+ },
+
+ {
+ text => '$EXPIRES in source',
+ name => 'c2',
+ src => \('[! $EXPIRES = 1 !]' . $src),
+ param => { param => ['expires in src'] },
+ 'cmp' => 'expires in src',
+ },
+ {
+ text => '$EXPIRES in source (cached)',
+ name => 'c2',
+ src => \('[! $EXPIRES = 1 !]' . $src),
+ param => { param => ['not cached expires in src'] },
+ 'cmp' => 'expires in src',
+ },
+ {
+ text => 'Wait for expire',
+ 'sleep' => 2,
+ },
+ {
+ text => '$EXPIRES in source (reexc)',
+ name => 'c2',
+ src => \('[! $EXPIRES = 1 !]' . $src),
+ param => { param => ['reexec expires in src'] },
+ 'cmp' => 'reexec expires in src',
+ },
+ {
+ text => 'sub EXPIRES in source',
+ name => 'c3',
+ src => \('[! sub EXPIRES { 0 } !]' . $src),
+ param => { param => ['expires_func in src'] },
+ 'cmp' => 'expires_func in src',
+ },
+ {
+ text => 'sub EXPIRES in source (cached)',
+ name => 'c3',
+ src => \('[! sub EXPIRES { 0 } !]' . $src),
+ param => { param => ['not cached expires_func in src'] },
+ 'cmp' => 'expires_func in src',
+ },
+ ) ;
+
+ foreach $cachetest (@cachetests)
+ {
+ if ($err == 0)
+ {
+ printf ("%-30s", "$cachetest->{text}...") ;
+ if ($cachetest->{'sleep'})
+ {
+ sleep $cachetest->{'sleep'} ;
+ }
+ else
+ {
+ $ENV{QUERY_STRING} = $cachetest->{'query_info'} if
($cachetest->{'query_info'}) ;
+ delete $ENV{QUERY_STRING} if (!$cachetest->{'query_info'})
;
+
+ $err = HTML::Embperl::Execute ({inputfile =>
$cachetest->{'name'} || 'c1',
+ input =>
$cachetest->{'src'} || \$src,
+ output => \$out,
+ mtime =>
$cachetest->{'mtime'} || 1,
+ %{$cachetest->{param}}}) ;
+ $err = CheckError (0) if ($err == 0) ;
+ $err = CmpInMem ($out, $cmp, $cachetest->{'cmp'}) if ($err
== 0) ;
+ }
+ print "ok\n" if ($err == 0) ;
+ }
+ }
+
+
+
+ }
+ $frommem = 0 if ($err == 0) ;
+ }
+
+
+
+
+ if ((($opt_execute) || ($opt_offline) || ($opt_cache)) && $looptest == 0)
+ {
close STDERR ;
open (STDERR, ">&SAVEERR") ;
}
@@ -1703,13 +1943,16 @@
if ($err)
{
- $page ||= '???' ;
- print "Input:\t\t$page\n" ;
- print "Output:\t\t$outfile\n" ;
- print "Compared to:\t$org\n" if ($org) ;
- print "Log:\t\t$logfile\n" ;
- @p = map { " $_ = $test->{$_}\n" } keys %$test if (ref ($test) eq 'HASH') ;
- print "Testparameter:\n @p" if (@p) ;
+ if (!$frommem)
+ {
+ $page ||= '???' ;
+ print "Input:\t\t$page\n" ;
+ print "Output:\t\t$outfile\n" ;
+ print "Compared to:\t$org\n" if ($org) ;
+ print "Log:\t\t$logfile\n" ;
+ @p = map { " $_ = $test->{$_}\n" } keys %$test if (ref ($test) eq 'HASH') ;
+ print "Testparameter:\n @p" if (@p) ;
+ }
print "\n ERRORS detected! NOT all test have been passed successfully\n\n" ;
}
else
1.2 +6 -0 embperl/test/cmp/heredoc.htm
1.29 +9 -4 embperl/test/conf/httpd.conf.src
Index: httpd.conf.src
===================================================================
RCS file: /home/cvs/embperl/test/conf/httpd.conf.src,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- httpd.conf.src 2000/11/13 08:58:29 1.28
+++ httpd.conf.src 2000/11/15 08:15:42 1.29
@@ -48,9 +48,14 @@
SetEnv EMBPERL_LOG $EPPATH/test/tmp/test.log
EOD
-print OFH "SetEnv EMBPERL_OPTIONS 0\n" if ($EPMODPERLVERSION >= 1.24) ;
+if ($^O eq 'MSWin32' && $EPMODPERLVERSION >= 1.24)
+ { # ActiveState workarounds...
+ print OFH "SetEnv EMBPERL_OPTIONS 0\n" ;
+ print OFH "SetEnv EMBPERL_ESCMODE 3\n" ;
+ }
+
if ($EPSESSIONVERSION)
{
print OFH <<EOD ;
@@ -351,9 +356,9 @@
LockFile tmp/httpd.lock
<IfModule apache_ssl.c>
-SSLDisable
-SSLCacheServerPort gcache_port
-SSLCacheServerPath $EPAPACHESRC/modules/ssl/gcache
+SSLDisable
+SSLCacheServerPort gcache_port
+SSLCacheServerPath $EPAPACHESRC/modules/ssl/gcache
</IfModule>
1.2 +13 -0 embperl/test/html/heredoc.htm
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]