From 77644ee620b6a79cf8c538abaf7cd301a875528d Mon Sep 17 00:00:00 2001
From: markm <markm@FreeBSD.org>
Date: Sun, 2 May 1999 14:33:17 +0000
Subject: Maintenance releace 3 of perl5.005. Includes support for threads.

---
 contrib/perl5/t/comp/package.t | 16 +++++++++++++++-
 contrib/perl5/t/comp/proto.t   | 12 +++++++++++-
 contrib/perl5/t/comp/require.t |  6 ++++--
 3 files changed, 30 insertions(+), 4 deletions(-)

(limited to 'contrib/perl5/t/comp')

diff --git a/contrib/perl5/t/comp/package.t b/contrib/perl5/t/comp/package.t
index d7d19ae..4982256 100755
--- a/contrib/perl5/t/comp/package.t
+++ b/contrib/perl5/t/comp/package.t
@@ -1,6 +1,6 @@
 #!./perl
 
-print "1..7\n";
+print "1..8\n";
 
 $blurfl = 123;
 $foo = 3;
@@ -37,3 +37,17 @@ print $blurfl == 5 ? "ok 4\n" : "not ok 4\n";
 eval 'print $blurfl == 5 ? "ok 5\n" : "not ok 5\n";';
 eval 'package main; print $blurfl == 123 ? "ok 6\n" : "not ok 6\n";';
 print $blurfl == 5 ? "ok 7\n" : "not ok 7\n";
+
+package main;
+
+sub c { caller(0) }
+
+sub foo {
+   my $s = shift;
+   if ($s) {
+	package PQR;
+	main::c();
+   }
+}
+
+print((foo(1))[0] eq 'PQR' ? "ok 8\n" : "not ok 8\n");
diff --git a/contrib/perl5/t/comp/proto.t b/contrib/perl5/t/comp/proto.t
index 6a59107..db6a9b5 100755
--- a/contrib/perl5/t/comp/proto.t
+++ b/contrib/perl5/t/comp/proto.t
@@ -16,7 +16,7 @@ BEGIN {
 
 use strict;
 
-print "1..82\n";
+print "1..87\n";
 
 my $i = 1;
 
@@ -413,3 +413,13 @@ sub X::foo4 ($);
 *X::foo4 = sub ($) {'ok'};
 print "not " unless X->foo4 eq 'ok';
 print "ok ", $i++, "\n";
+
+# test if the (*) prototype allows barewords, constants, scalar expressions,
+# globs and globrefs (just as CORE::open() does), all under stricture
+sub star (*&) { &{$_[1]} }
+my $star = 'FOO';
+star FOO, sub { print "ok $i\n" if $_[0] eq 'FOO' }; $i++;
+star "FOO", sub { print "ok $i\n" if $_[0] eq 'FOO' }; $i++;
+star $star, sub { print "ok $i\n" if $_[0] eq 'FOO' }; $i++;
+star *FOO, sub { print "ok $i\n" if $_[0] eq \*FOO }; $i++;
+star \*FOO, sub { print "ok $i\n" if $_[0] eq \*FOO }; $i++;
diff --git a/contrib/perl5/t/comp/require.t b/contrib/perl5/t/comp/require.t
index 203b996..5c41f5c 100755
--- a/contrib/perl5/t/comp/require.t
+++ b/contrib/perl5/t/comp/require.t
@@ -2,7 +2,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    @INC = ('.');
+    @INC = ('.', '../lib');
 }
 
 # don't make this lexical
@@ -35,7 +35,9 @@ print "ok ",$i++,"\n";
 
 # compile-time failure in require
 do_require "1)\n";
-print "# $@\nnot " unless $@ =~ /syntax error/i;
+# bison says 'parse error' instead of 'syntax error',
+# various yaccs may or may not capitalize 'syntax'.
+print "# $@\nnot " unless $@ =~ /(syntax|parse) error/mi;
 print "ok ",$i++,"\n";
 
 # successful require
-- 
cgit v1.1