richter 01/05/02 01:59:16
Modified: . Tag: Embperl2c MANIFEST MANIFEST.2 test.pl
test/html Tag: Embperl2c loop.htm loopperl.htm
test/html/EmbperlObject Tag: Embperl2c epodiv.htm
Added: test/cmp2 Tag: Embperl2c epobless3.htm
Log:
Embperl 2 - fix make test
Revision Changes Path
No revision
No revision
1.50.4.20 +1 -0 embperl/MANIFEST
Index: MANIFEST
===================================================================
RCS file: /home/cvs/embperl/MANIFEST,v
retrieving revision 1.50.4.19
retrieving revision 1.50.4.20
diff -u -r1.50.4.19 -r1.50.4.20
--- MANIFEST 2001/04/27 06:39:29 1.50.4.19
+++ MANIFEST 2001/05/02 08:59:08 1.50.4.20
@@ -34,6 +34,7 @@
test/cmp2/importmodule.htm
test/cmp2/epoincdiv.htm
test/cmp2/epobless2.htm
+test/cmp2/epobless3.htm
test/cmp2/epodiv.htm
test/cmp2/varerr.htm56
test/html2/error.htm
1.1.2.13 +1 -0 embperl/Attic/MANIFEST.2
Index: MANIFEST.2
===================================================================
RCS file: /home/cvs/embperl/Attic/MANIFEST.2,v
retrieving revision 1.1.2.12
retrieving revision 1.1.2.13
diff -u -r1.1.2.12 -r1.1.2.13
--- MANIFEST.2 2001/04/27 06:39:29 1.1.2.12
+++ MANIFEST.2 2001/05/02 08:59:09 1.1.2.13
@@ -35,6 +35,7 @@
test/cmp2/epodiv.htm
test/cmp2/epoincdiv.htm
test/cmp2/epobless2.htm
+test/cmp2/epobless3.htm
test/cmp2/varerr.htm56
test/html2/error.htm
test/html2/errormismatch.htm
1.70.4.49 +47 -47 embperl/test.pl
Index: test.pl
===================================================================
RCS file: /home/cvs/embperl/test.pl,v
retrieving revision 1.70.4.48
retrieving revision 1.70.4.49
diff -u -r1.70.4.48 -r1.70.4.49
--- test.pl 2001/04/27 06:33:19 1.70.4.48
+++ test.pl 2001/05/02 08:59:10 1.70.4.49
@@ -1,24 +1,23 @@
#!/usr/bin/perl --
-
-###################################################################################
-#
-# Embperl - Copyright (c) 1997-2001 Gerald Richter / ECOS
-#
-# You may distribute under the terms of either the GNU General Public
-# License or the Artistic License, as specified in the Perl README file.
-#
-# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-#
-# $Id: test.pl,v 1.70.4.48 2001/04/27 06:33:19 richter Exp $
-#
-###################################################################################
-
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'
+# version =>
+# errors =>
+# query_string =>
+# repeat =>
+# cmpext =>
+# option =>
+# debug =>
+# cgi =>
+# offline =>
+# modperl =>
+# package =>
+# compartment =>
+# cookie =>
+# condition =>
+
@testdata = (
'ascii' => { },
'pure.htm' => { },
@@ -85,7 +84,6 @@
'errors' => 6,
'version' => 2,
'cgi' => 0,
- 'noloop' => 1,
},
'rawinput/rawinput.htm' => {
'option' => '16',
@@ -166,9 +164,6 @@
},
'java.htm' => { },
'inputjava.htm' => { },
- 'inputjs2.htm' => {
- 'version' => 2,
- },
'heredoc.htm' => { },
'post.htm' => {
'offline' => 0,
@@ -176,7 +171,6 @@
'upload.htm' => {
'query_info' => 'multval=A&multval=B&multval=C&single=S',
'offline' => 0,
- 'noloop' => 1,
},
'reqrec.htm' => {
'offline' => 0,
@@ -227,14 +221,6 @@
'version' => 2,
'repeat' => 2,
},
- 'execfirst.htm' => {
- 'version' => 2,
- },
- 'execsecond.htm' => {
- 'version' => 2,
- },
-# 'execinside.htm' => {
-# },
'importsub.htm' => {
'repeat' => 2,
},
@@ -259,7 +245,6 @@
},
'sub.htm' => { },
'sub.htm' => { },
- 'subtab.htm' => { },
'exit.htm' => {
'version' => 1,
'offline' => 0,
@@ -345,7 +330,17 @@
'compartment'=> 'TEST',
'version' => 1,
'cgi' => 0,
+ 'condition' => '$] < 5.006001',
},
+ 'opmask/opmasktrap.htm' => {
+ 'option' => '12',
+ 'errors' => '1',
+ 'compartment'=> 'TEST',
+ 'version' => 1,
+ 'cgi' => 0,
+ 'condition' => '$] >= 5.006001',
+ 'cmpext' => '.561',
+ },
'mdatsess.htm' => {
'offline' => 0,
'query_info' => 'cnt=0',
@@ -488,7 +483,6 @@
'offline' => 0,
'cgi' => 0,
'repeat' => 2,
- 'version' => 1,
},
'EmbperlObject/obj/epoobj1.htm' => {
'offline' => 0,
@@ -530,7 +524,7 @@
},
'inctext.htm' => {
'ep1compat' => 0,
- 'version' => 2,
+# 'version' => 2,
},
'incperl.htm' => {
'version' => 2,
@@ -539,12 +533,6 @@
'version' => 2,
'repeat' => 2,
},
- 'asp.htm' => {
- 'version' => 2,
- },
-# 'mail.htm' => {
-# 'version' => 2,
-# },
) ;
for ($i = 0 ; $i < @testdata; $i += 2)
@@ -588,7 +576,7 @@
$opt_testlib = 1 ;
}
- if ($INC[0] =~ /^(\.\/)?blib/ )
+ if ($INC[0] =~ /^blib/)
{
my $i = 0 ;
foreach (@INC)
@@ -810,7 +798,7 @@
sub CmpFiles
{
my ($f1, $f2, $errin) = @_ ;
- my $line = 1 ;
+ my $line = 0 ;
my $err = 0 ;
open F1, $f1 || die "***Cannot open $f1" ;
@@ -821,9 +809,13 @@
while (defined ($l1 = <F1>))
{
- chompcr ($l1) ;
+ $line++ ;
+ chompcr ($l1) ;
while (($l1 =~ /^\s*$/) && defined ($l1 = <F1>))
- { chompcr ($l1) ; }
+ {
+ $line++ ;
+ chompcr ($l1) ;
+ }
if (!$errin)
@@ -876,7 +868,6 @@
print "\nError in Line $line\nIs:\t>$l1<\nShould:\t>$l2<\n" ;
return $line ;
}
- $line++ ;
}
if (!$errin)
@@ -1073,7 +1064,7 @@
open SVLOG, $logfile or die "Cannot open $logfile ($!)" ;
- seek SVLOG, ($EP2?-10000:-3000), 2 ;
+ seek SVLOG, -3000, 2 ;
while (<SVLOG>)
{
@@ -1222,7 +1213,7 @@
$ENV{EMBPERL_ALLOW} = 'asc|\\.htm$|\\.htm-1$' ;
-HTML::Embperl::log ("Start testing...\n") ; # force logfile open
+#HTML::Embperl::log ("Start testing...\n") ; # force logfile open
do
{
@@ -1269,10 +1260,14 @@
next if ($DProf && ($file =~ /safe/)) ;
next if ($DProf && ($file =~ /opmask/)) ;
+
+ if (exists ($test -> {condition}))
+ {
+ next if (!eval ($test -> {condition})) ;
+ }
$errcnt = $test -> {errors} || 0 ;
$errcnt = 7 if ($file eq 'varerr.htm' && $^V && $^V ge v5.6.0) ;
- $errcnt++ if ($file eq 'varerr.htm' && $^V && $^V ge v5.6.0 &&
$testversion == 2) ;
$debug = $test -> {debug} || $defaultdebug ;
$debug = 0 if ($opt_qq) ;
@@ -1329,6 +1324,7 @@
$org = "$cmppath/$1" ;
$org = "$cmppath$testversion/$1" if (-e "$cmppath$testversion/$1")
;
$org .= '56' if ($file eq 'varerr.htm' && $^V && $^V ge v5.6.0)
;
+ $org .= $test -> {cmpext} if ($test -> {cmpext}) ;
#$org .= '-1' if ($ep1compat && -e "$org-1") ;
$err = CmpFiles ($outfile, $org, $errin) ;
@@ -1904,6 +1900,11 @@
next if (defined ($opt_ab) && $test -> {'errors'}) ;
+ if (exists ($test -> {condition}))
+ {
+ next if (!eval ($test -> {condition})) ;
+ }
+
=pod
next if ($file =~ /\// && $loc eq $cgiloc) ;
@@ -1937,7 +1938,6 @@
$errcnt = $test -> {errors} || 0 ;
$errcnt = 7 if ($file eq 'varerr.htm' && $^V && $^V ge v5.6.0) ;
- $errcnt++ if ($file eq 'varerr.htm' && $^V && $^V ge v5.6.0 &&
$testversion == 2) ;
$errcnt = -1 if ($EPWIN32 && $loc eq $cgiloc) ;
$debug = $test -> {debug} || $defaultdebug ;
No revision
No revision
1.1.2.1 +32 -0 embperl/test/cmp2/Attic/epobless3.htm
No revision
No revision
1.5.4.3 +6 -3 embperl/test/html/loop.htm
Index: loop.htm
===================================================================
RCS file: /home/cvs/embperl/test/html/loop.htm,v
retrieving revision 1.5.4.2
retrieving revision 1.5.4.3
diff -u -r1.5.4.2 -r1.5.4.3
--- loop.htm 2000/09/14 05:08:33 1.5.4.2
+++ loop.htm 2001/05/02 08:59:14 1.5.4.3
@@ -26,7 +26,8 @@
[- %h = ('A' => 1, 'B' => 2, 'C' => 3) ; -]
[- @a = ('a', 'b', 'c', 'd') ; -]
-[$ while ($v, $k) = each (%h) $]
+[- @hh = map { $_ => $h{$_} } sort keys %h -]
+[$ while ($v = shift @hh, $k = shift @hh) $]
[+ "$v = $k" +]<br>
[$ endwhile $]
@@ -61,14 +62,16 @@
[- $i = 0 -]
[$ do $]
[+ "\@a[$i] = $a[$i]" +]<br>
- [$ while ($v, $k) = each (%h) $]
+ [- @hh = map { $_ => $h{$_} } sort keys %h -]
+ [$ while ($v = shift @hh, $k = shift @hh) $]
[+ "$v = $k" +]<br>
[$ foreach $fv (1, 3, 5, 7, 9) $]
[+ $fv +] <br>
[$ endforeach $]
[$ foreach $fv (()) $]
[+ $fv +] <br>
- [$ while ($wv, $wk) = each (%h) $]
+ [- @hhh = map { $_ => $h{$_} } sort keys %h -]
+ [$ while ($wv = shift @hhh, $wk = shift @hhh) $]
[+ "$wv = $wk" +]<br>
[$ endwhile $]
[$ endforeach $]
1.2.6.1 +6 -3 embperl/test/html/loopperl.htm
Index: loopperl.htm
===================================================================
RCS file: /home/cvs/embperl/test/html/loopperl.htm,v
retrieving revision 1.2
retrieving revision 1.2.6.1
diff -u -r1.2 -r1.2.6.1
--- loopperl.htm 1999/10/05 06:03:45 1.2
+++ loopperl.htm 2001/05/02 08:59:14 1.2.6.1
@@ -26,7 +26,8 @@
[- %h = ('A' => 1, 'B' => 2, 'C' => 3) ; -]
[- @a = ('a', 'b', 'c', 'd') ; -]
-[* while (($v, $k) = each (%h)) { *]
+[* @hh = map { $_ => $h{$_} } sort keys %h ;
+ while ($v = shift @hh, $k = shift @hh) { *]
[+ "$v = $k" +]<br>
[* } *]
@@ -57,14 +58,16 @@
[- $i = 0 -]
[* do { *]
[+ "\@a[$i] = $a[$i]" +]<br>
- [* while (($v, $k) = each (%h)) { *]
+ [* @hh = map { $_ => $h{$_} } sort keys %h ;
+ while (($v = shift @hh, $k = shift @hh)) { *]
[+ "$v = $k" +]<br>
[* foreach $fv (1, 3, 5, 7, 9) { *]
[+ $fv +] <br>
[* } *]
[* foreach $fv (1) { *]
[+ $fv +] <br>
- [* while (($wv, $wk) = each (%hhh)) { *]
+ [- @hhh = map { $_ => $h{$_} } sort keys %hhh ; -]
+ [* while (($wv = shift @hhh, $wk = shift @hhh)) { *]
[+ "$wv = $wk" +]<br>
[* } *]
[* } *]
No revision
No revision
1.1.4.2 +8 -5 embperl/test/html/EmbperlObject/epodiv.htm
Index: epodiv.htm
===================================================================
RCS file: /home/cvs/embperl/test/html/EmbperlObject/epodiv.htm,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -r1.1.4.1 -r1.1.4.2
--- epodiv.htm 2000/11/03 12:04:23 1.1.4.1
+++ epodiv.htm 2001/05/02 08:59:16 1.1.4.2
@@ -6,7 +6,7 @@
<body>
-[$ var $a $b $c $d $e $i $j $ii $v $k $fv @a %a @b %h @c @ii %hash $wv $wk $]
+[$ var $a $b $c $d $e $i $j $ii $v $k $fv @a %a @b %h @c @ii %hash $wv $wk @hh @hhh
$]
Here it starts with some HTML Text<P>
@@ -225,7 +225,8 @@
[- %h = ('A' => 1, 'B' => 2, 'C' => 3) ; -]
[- @a = ('a', 'b', 'c', 'd') ; -]
-[$ while ($v, $k) = each (%h) $]
+[- @hh = map { $_ => $h{$_} } sort keys %h -]
+[$ while ($v = shift @hh, $k = shift @hh) $]
[+ "$v = $k" +]<br>
[$ endwhile $]
@@ -258,21 +259,23 @@
[$ endforeach $]
[- %hash = ( a=>1, b=>2, c=>3) -]
-[$ foreach $v(keys %hash) $]
+[$ foreach $v(sort keys %hash) $]
3:[+ $v +] <br>
[$ endforeach $]
[- $i = 0 -]
[$ do $]
[+ "\@a[$i] = $a[$i]" +]<br>
- [$ while ($v, $k) = each (%h) $]
+ [- @hh = map { $_ => $h{$_} } sort keys %h -]
+ [$ while ($v = shift @hh, $k = shift @hh) $]
[+ "$v = $k" +]<br>
[$ foreach $fv (1, 3, 5, 7, 9) $]
[+ $fv +] <br>
[$ endforeach $]
[$ foreach $fv (()) $]
[+ $fv +] <br>
- [$ while ($wv, $wk) = each (%h) $]
+ [- @hh = map { $_ => $h{$_} } sort keys %h -]
+ [$ while ($wv = shift @hh, $wk = shift @hh) $]
[+ "$wv = $wk" +]<br>
[$ endwhile $]
[$ endforeach $]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]