Subject: | Test suite fails on v5.10.0 built for MSWin32-x86-multi-thread |
Test suite fails on v5.10.0 built for MSWin32-x86-multi-thread.
Issues fixed with the attached patch file:
1) lib/Parse/Template.pm was missing a semicolon after "use strict";
2) lib/Parse/Template.pm was using an undeclared $expr variable;
3) lib/Parse/Template.pm was declaring a Parse::Token::Nested package with a recursive inheritance;
4) t/W.pm was calling $cmd without adding the include path of the compiled module, added "-Iblib/lib";
5) t/test4.t failed because it expected "at examples/ctokenizer.pl line 17, <DATA> chunk 4", but the current perl version returns "at examples/ctokenizer.pl line 17, <DATA> line 4".
With the attached patch installed, all tests pass on my platform.
Issues fixed with the attached patch file:
1) lib/Parse/Template.pm was missing a semicolon after "use strict";
2) lib/Parse/Template.pm was using an undeclared $expr variable;
3) lib/Parse/Template.pm was declaring a Parse::Token::Nested package with a recursive inheritance;
4) t/W.pm was calling $cmd without adding the include path of the compiled module, added "-Iblib/lib";
5) t/test4.t failed because it expected "at examples/ctokenizer.pl line 17, <DATA> chunk 4", but the current perl version returns "at examples/ctokenizer.pl line 17, <DATA> line 4".
With the attached patch installed, all tests pass on my platform.
Subject: | ParseLex-2.15-patch.txt |
diff -r -c ParseLex-2.15/examples/ctokenizer.pl ParseLex-2.15a/examples/ctokenizer.pl
*** ParseLex-2.15/examples/ctokenizer.pl Thu Sep 23 10:16:24 1999
--- ParseLex-2.15a/examples/ctokenizer.pl Sat Dec 26 19:19:56 2009
***************
*** 1,7 ****
#!/usr/local/bin/perl -w
require 5.000;
! BEGIN { unshift @INC, "../lib"; }
use Parse::CLex;
@token = (
--- 1,7 ----
#!/usr/local/bin/perl -w
require 5.000;
! #BEGIN { unshift @INC, "../lib"; }
use Parse::CLex;
@token = (
diff -r -c ParseLex-2.15/lib/Parse/Template.pm ParseLex-2.15a/lib/Parse/Template.pm
*** ParseLex-2.15/lib/Parse/Template.pm Thu Sep 23 10:16:28 1999
--- ParseLex-2.15a/lib/Parse/Template.pm Sat Dec 26 18:25:40 2009
***************
*** 1,4 ****
! use strict
require 5.004;
package Parse::Template;
$Parse::Template::VERSION = '0.32';
--- 1,4 ----
! use strict;
require 5.004;
package Parse::Template;
$Parse::Template::VERSION = '0.32';
***************
*** 132,138 ****
}
# evaluated expressions are not always available in (caller(1))[6];
if (defined($1) and $1 ne '') {
! $expr = $1; # what is the template expression?
{ package DB; # what is the part name?
@DB::caller = caller(2); # why is this needed? /ee?
@DB::caller = caller(1);
--- 132,138 ----
}
# evaluated expressions are not always available in (caller(1))[6];
if (defined($1) and $1 ne '') {
! my $expr = $1; # what is the template expression?
{ package DB; # what is the part name?
@DB::caller = caller(2); # why is this needed? /ee?
@DB::caller = caller(1);
diff -r -c ParseLex-2.15/lib/Parse/Token.pm ParseLex-2.15a/lib/Parse/Token.pm
*** ParseLex-2.15/lib/Parse/Token.pm Mon Sep 27 13:18:06 1999
--- ParseLex-2.15a/lib/Parse/Token.pm Sat Dec 26 18:31:20 2009
***************
*** 1125,1140 ****
[$start, $content, $end];
}
! package Parse::Token::Nested;
! use Parse::Trace;
! @Parse::Token::Nested::ISA = qw(Parse::Token::Nested Parse::Trace);
!
# Examples:
# (+ (* 3 4) 4)
#
! sub new {
! die "Sorry! Not yet implemented";
! }
1;
__END__
--- 1125,1140 ----
[$start, $content, $end];
}
! #package Parse::Token::Nested;
! #use Parse::Trace;
! #@Parse::Token::Nested::ISA = qw(Parse::Token::Nested Parse::Trace);
! #
# Examples:
# (+ (* 3 4) 4)
#
! #sub new {
! # die "Sorry! Not yet implemented";
! #}
1;
__END__
***************
*** 1409,1418 ****
C<Parse::Token::Quoted> : permits recognizing, for example,
character strings within quotation marks.
! C<Parse::Token::Nested> : permits recognizing nested structures
! such as parenthesized expressions. NOT DEFINED.
! These classes are recently created and no doubt contain some bugs.
=head2 Parse::Token::Action
--- 1409,1420 ----
C<Parse::Token::Quoted> : permits recognizing, for example,
character strings within quotation marks.
! =cut
! #C<Parse::Token::Nested> : permits recognizing nested structures
! #such as parenthesized expressions. NOT DEFINED.
! #
! #These classes are recently created and no doubt contain some bugs.
=head2 Parse::Token::Action
diff -r -c ParseLex-2.15/t/W.pm ParseLex-2.15a/t/W.pm
*** ParseLex-2.15/t/W.pm Thu Sep 23 10:16:26 1999
--- ParseLex-2.15a/t/W.pm Sat Dec 26 18:20:44 2009
***************
*** 22,37 ****
my @err;
my $result;
if ($cmd) {
! print "Execution of $^X $cmd\n" if $verbose;
die qq^unable to find "$cmd"^ unless (-f $cmd);
# the following line doesn't work on Win95 (ActiveState's Perl, build 516):
! # open( CMD, "$^X $cmd 2>err |" ) or warn "$0: Can't run. $!\n";
# corrected by Stefan Becker:
local *SAVE_STDERR;
open(SAVE_STDERR, ">&STDERR");
open STDERR, "> err";
! open( CMD, "$^X $cmd |" ) or warn "$0: Can't run. $!\n";
@result = <CMD>;
close CMD;
close STDERR;
--- 22,37 ----
my @err;
my $result;
if ($cmd) {
! print "Execution of $^X -Iblib/lib $cmd\n" if $verbose;
die qq^unable to find "$cmd"^ unless (-f $cmd);
# the following line doesn't work on Win95 (ActiveState's Perl, build 516):
! # open( CMD, "$^X -Iblib/lib $cmd 2>err |" ) or warn "$0: Can't run. $!\n";
# corrected by Stefan Becker:
local *SAVE_STDERR;
open(SAVE_STDERR, ">&STDERR");
open STDERR, "> err";
! open( CMD, "$^X -Iblib/lib $cmd |" ) or warn "$0: Can't run. $!\n";
@result = <CMD>;
close CMD;
close STDERR;
***************
*** 46,52 ****
$self->{result} = join('', @result);
if ($log) {
print LOG "=" x 80, "\n";
! print LOG "Execution of $^X $cmd 2>err\n";
print LOG "=" x 80, "\n";
print LOG "* Result:\n";
print LOG "-" x 80, "\n";
--- 46,52 ----
$self->{result} = join('', @result);
if ($log) {
print LOG "=" x 80, "\n";
! print LOG "Execution of $^X -Iblib/lib $cmd 2>err\n";
print LOG "=" x 80, "\n";
print LOG "* Result:\n";
print LOG "-" x 80, "\n";
diff -r -c ParseLex-2.15/t/test4.t ParseLex-2.15a/t/test4.t
*** ParseLex-2.15/t/test4.t Thu Sep 23 10:16:26 1999
--- ParseLex-2.15a/t/test4.t Sat Dec 26 19:36:38 2009
***************
*** 10,17 ****
print $test->report(1, sub {
my $expectation = $test->expected;
my $result = $test->result;
! $expectation =~ s/\s+$//;
! $result =~ s/\s+$//;
unless ($expectation eq $result) {
print "$result\n" if $ENV{TEST_VERBOSE};
0;
--- 10,17 ----
print $test->report(1, sub {
my $expectation = $test->expected;
my $result = $test->result;
! $expectation =~ s/\s+$//; $expectation =~ s/<DATA> (chunk|line)/<DATA> line/g;
! $result =~ s/\s+$//; $result =~ s/<DATA> (chunk|line)/<DATA> line/g;
unless ($expectation eq $result) {
print "$result\n" if $ENV{TEST_VERBOSE};
0;
Only in ParseLex-2.15a: testlog