develooper Front page | perl.perl5.porters | Postings from January 2001

[PATCH: perl@8342] comp/proto..........FAILED tests 112-123

Thread Next
From:
Roca, Ignasi
Date:
January 9, 2001 08:32
Subject:
[PATCH: perl@8342] comp/proto..........FAILED tests 112-123
Message ID:
5930DC161690D2119667009027157547037B47E5@madt009a.siemens.es
Using Bison parser generator, the parser produces the message "parse error"
instead of "syntax error"

Following is a diff file of test script proto.t to avoid the test failures.

====================================================
--- proto.t.orig        Thu Dec 28 23:10:16 2000
+++ proto.t     Tue Jan  9 17:16:17 2001
@@ -15,6 +15,7 @@
 BEGIN {
     chdir 't' if -d 't';
     @INC = '../lib';
+    require Config; import Config;
 }
 
 use strict;
@@ -492,11 +493,15 @@
 
 # test prototypes when they are evaled and there is a syntax error
 #
+my $msg = "syntax";
 
+if ($Config{ccflags} =~ /-DUSE_PURE_BISON/) {
+    $msg = "parse";
+}
 for my $p ( "", qw{ () ($) ($@) ($%) ($;$) (&) (&\@) (&@) (%) (\%) (\@) } )
{
   no warnings 'redefine';
   my $eval = "sub evaled_subroutine $p { &void *; }";
   eval $eval;
-  print "# eval[$eval]\nnot " unless $@ && $@ =~ /syntax error/;
+  print "# eval[$eval]\nnot " unless $@ && $@ =~ /$msg error/;
   print "ok ", $i++, "\n";
 }
 
===================================================

 


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About