# we should test as many as we can.
#
-# XXX known to leak scalars
-$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
-
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
use strict;
-print "1..123\n";
+print "1..125\n";
my $i = 1;
@array = (qw(O K)," ", $i++);
sub_array { lc shift } @array;
+sub_array { lc shift } ('O', 'K', ' ', $i++);
print "\n";
##
}
# test prototypes when they are evaled and there is a syntax error
+# Byacc generates the string "syntax error". Bison gives the
+# string "parse error".
#
for my $p ( "", qw{ () ($) ($@) ($%) ($;$) (&) (&\@) (&@) (%) (\%) (\@) } ) {
- no warnings 'redefine';
+ no warnings 'prototype';
my $eval = "sub evaled_subroutine $p { &void *; }";
eval $eval;
- print "# eval[$eval]\nnot " unless $@ && $@ =~ /syntax error/;
+ print "# eval[$eval]\nnot " unless $@ && $@ =~ /(parse|syntax) error/i;
print "ok ", $i++, "\n";
}
# Not $$;$;$
print "not " unless prototype "CORE::substr" eq '$$;$$';
print "ok ", $i++, "\n";
+
+# recv takes a scalar reference for its second argument
+print "not " unless prototype "CORE::recv" eq '*\\$$$';
+print "ok ", $i++, "\n";