Change 12356 by jhi@alpha on 2001/10/08 11:53:30
Subject: [PATCH] & what's to be done for 5.8.0?
From: Nicholas Clark <[EMAIL PROTECTED]>
Date: Sun, 7 Oct 2001 20:53:33 +0100
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/ext/B/t/showlex.t#2 edit
... //depot/perl/ext/B/t/stash.t#2 edit
... //depot/perl/ext/Cwd/t/taint.t#2 edit
... //depot/perl/ext/DB_File/t/db-btree.t#3 edit
... //depot/perl/ext/DB_File/t/db-hash.t#3 edit
... //depot/perl/ext/DB_File/t/db-recno.t#3 edit
... //depot/perl/ext/Fcntl/t/fcntl.t#2 edit
... //depot/perl/lib/CGI/t/carp.t#3 edit
... //depot/perl/lib/CGI/t/cookie.t#2 edit
... //depot/perl/lib/File/Find/t/taint.t#2 edit
... //depot/perl/lib/FindBin.t#2 edit
... //depot/perl/lib/Net/t/ftp.t#3 edit
... //depot/perl/lib/Net/t/hostname.t#2 edit
... //depot/perl/lib/Net/t/nntp.t#2 edit
... //depot/perl/lib/Net/t/smtp.t#2 edit
... //depot/perl/lib/Switch/t/given.t#2 edit
... //depot/perl/lib/Switch/t/nested.t#2 edit
... //depot/perl/lib/Switch/t/switch.t#2 edit
... //depot/perl/lib/Term/Complete.t#6 edit
... //depot/perl/lib/Test/Simple/t/plan_is_noplan.t#6 edit
... //depot/perl/lib/Test/Simple/t/todo.t#3 edit
... //depot/perl/lib/bigfloat.t#2 edit
... //depot/perl/lib/bigint.t#2 edit
... //depot/perl/lib/integer.t#3 edit
... //depot/perl/t/op/flip.t#11 edit
... //depot/perl/t/op/my_stash.t#5 edit
Differences ...
==== //depot/perl/ext/B/t/showlex.t#2 (xtext) ====
Index: perl/ext/B/t/showlex.t
--- perl/ext/B/t/showlex.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/ext/B/t/showlex.t Mon Oct 8 06:00:05 2001
@@ -1,8 +1,11 @@
#!./perl
BEGIN {
+ chdir 't' if -d 't';
if ($^O eq 'MacOS') {
@INC = qw(: ::lib ::macos:lib);
+ } else {
+ @INC = '../lib';
}
}
==== //depot/perl/ext/B/t/stash.t#2 (xtext) ====
Index: perl/ext/B/t/stash.t
--- perl/ext/B/t/stash.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/ext/B/t/stash.t Mon Oct 8 06:00:05 2001
@@ -1,8 +1,11 @@
#!./perl
BEGIN {
+ chdir 't' if -d 't';
if ($^O eq 'MacOS') {
@INC = qw(: ::lib ::macos:lib);
+ } else {
+ @INC = '../lib';
}
}
==== //depot/perl/ext/Cwd/t/taint.t#2 (text) ====
Index: perl/ext/Cwd/t/taint.t
--- perl/ext/Cwd/t/taint.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/ext/Cwd/t/taint.t Mon Oct 8 06:00:05 2001
@@ -17,5 +17,5 @@
my $cwd;
eval { $cwd = getcwd; };
is( $@, '', 'getcwd() does not explode under taint mode' );
-ok( is_tainted($cwd), "it's return value is tainted" );
+ok( is_tainted($cwd), "its return value is tainted" );
==== //depot/perl/ext/DB_File/t/db-btree.t#3 (xtext) ====
Index: perl/ext/DB_File/t/db-btree.t
--- perl/ext/DB_File/t/db-btree.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/ext/DB_File/t/db-btree.t Mon Oct 8 06:00:05 2001
@@ -1,6 +1,7 @@
#!./perl -w
BEGIN {
+ chdir 't' if -d 't';
@INC = '../lib';
require Config; import Config;
if ($Config{'extensions'} !~ /\bDB_File\b/) {
==== //depot/perl/ext/DB_File/t/db-hash.t#3 (xtext) ====
Index: perl/ext/DB_File/t/db-hash.t
--- perl/ext/DB_File/t/db-hash.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/ext/DB_File/t/db-hash.t Mon Oct 8 06:00:05 2001
@@ -1,6 +1,7 @@
#!./perl -w
BEGIN {
+ chdir 't' if -d 't';
@INC = '../lib';
require Config; import Config;
if ($Config{'extensions'} !~ /\bDB_File\b/) {
==== //depot/perl/ext/DB_File/t/db-recno.t#3 (xtext) ====
Index: perl/ext/DB_File/t/db-recno.t
--- perl/ext/DB_File/t/db-recno.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/ext/DB_File/t/db-recno.t Mon Oct 8 06:00:05 2001
@@ -1,6 +1,7 @@
#!./perl -w
BEGIN {
+ chdir 't' if -d 't';
@INC = '../lib';
require Config; import Config;
if ($Config{'extensions'} !~ /\bDB_File\b/) {
==== //depot/perl/ext/Fcntl/t/fcntl.t#2 (text) ====
Index: perl/ext/Fcntl/t/fcntl.t
--- perl/ext/Fcntl/t/fcntl.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/ext/Fcntl/t/fcntl.t Mon Oct 8 06:00:05 2001
@@ -1,5 +1,10 @@
#!./perl
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
# A modest test: exercises only O_WRONLY, O_CREAT, and O_RDONLY.
# Have to be modest to be portable: could possibly extend testing
# also to O_RDWR and O_APPEND, but dunno about the portability of,
==== //depot/perl/lib/CGI/t/carp.t#3 (text) ====
Index: perl/lib/CGI/t/carp.t
--- perl/lib/CGI/t/carp.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/lib/CGI/t/carp.t Mon Oct 8 06:00:05 2001
@@ -1,8 +1,13 @@
# -*- Mode: cperl; coding: utf-8; cperl-indent-level: 2 -*-
#!/usr/local/bin/perl -w
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
use strict;
-use lib qw(t/lib);
+#use lib qw(t/lib);
use Test::More tests => 42;
use IO::Handle;
@@ -91,7 +96,7 @@
# Test that _warn is called at the correct time
$CGI::Carp::WARN = 1;
-$expect_l = __LINE__ + 1;
+my $save_expect_l = $expect_l = __LINE__ + 1;
like(CGI::Carp::warn("There is a problem"),
"/] $id: There is a problem at $q_file line $expect_l.".'$/',
"CGI::Carp::warn builds correct message");
@@ -166,7 +171,7 @@
open(STDOUT, ">&REAL_STDOUT");
my $fname = $0;
$fname =~ tr/<>-/\253\273\255/; # _warn does this so we have to also
-is( $fake_out, "<!-- warning: There is a problem at $fname line 95. -->\n",
+is( $fake_out, "<!-- warning: There is a problem at $fname line $save_expect_l.
+-->\n",
'warningsToBrowser() on' );
is($CGI::Carp::EMIT_WARNINGS, 1, "Warnings turned off");
==== //depot/perl/lib/CGI/t/cookie.t#2 (text) ====
Index: perl/lib/CGI/t/cookie.t
--- perl/lib/CGI/t/cookie.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/lib/CGI/t/cookie.t Mon Oct 8 06:00:05 2001
@@ -1,5 +1,10 @@
#!/usr/local/bin/perl -w
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
use strict;
use Test::More tests => 86;
use CGI::Util qw(escape unescape);
==== //depot/perl/lib/File/Find/t/taint.t#2 (text) ====
Index: perl/lib/File/Find/t/taint.t
--- perl/lib/File/Find/t/taint.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/lib/File/Find/t/taint.t Mon Oct 8 06:00:05 2001
@@ -6,12 +6,15 @@
my %Expect_Dir = (); # what we expect for $File::Find::dir
my ($cwd, $cwd_untainted);
-use Config;
BEGIN {
chdir 't' if -d 't';
unshift @INC => '../lib';
+}
+use Config;
+
+BEGIN {
for (keys %ENV) { # untaint ENV
($ENV{$_}) = $ENV{$_} =~ /(.*)/;
}
==== //depot/perl/lib/FindBin.t#2 (xtext) ====
Index: perl/lib/FindBin.t
--- perl/lib/FindBin.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/lib/FindBin.t Mon Oct 8 06:00:05 2001
@@ -1,8 +1,8 @@
#!./perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
+ # Can't chdir in BEGIN before FindBin runs, as it then can't find us.
+ @INC = -d 't' ? 'lib' : '../lib';
}
print "1..1\n";
==== //depot/perl/lib/Net/t/ftp.t#3 (text) ====
Index: perl/lib/Net/t/ftp.t
--- perl/lib/Net/t/ftp.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/lib/Net/t/ftp.t Mon Oct 8 06:00:05 2001
@@ -1,5 +1,10 @@
#!./perl -w
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
use Net::Config;
use Net::FTP;
==== //depot/perl/lib/Net/t/hostname.t#2 (text) ====
Index: perl/lib/Net/t/hostname.t
--- perl/lib/Net/t/hostname.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/lib/Net/t/hostname.t Mon Oct 8 06:00:05 2001
@@ -1,3 +1,9 @@
+#!./perl -w
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
use Net::Domain qw(hostname domainname hostdomain);
use Net::Config;
==== //depot/perl/lib/Net/t/nntp.t#2 (text) ====
Index: perl/lib/Net/t/nntp.t
--- perl/lib/Net/t/nntp.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/lib/Net/t/nntp.t Mon Oct 8 06:00:05 2001
@@ -1,5 +1,10 @@
#!./perl -w
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
use Net::Config;
use Net::NNTP;
use Net::Cmd qw(CMD_REJECT);
==== //depot/perl/lib/Net/t/smtp.t#2 (text) ====
Index: perl/lib/Net/t/smtp.t
--- perl/lib/Net/t/smtp.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/lib/Net/t/smtp.t Mon Oct 8 06:00:05 2001
@@ -1,5 +1,10 @@
#!./perl -w
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
use Net::Config;
use Net::SMTP;
==== //depot/perl/lib/Switch/t/given.t#2 (xtext) ====
Index: perl/lib/Switch/t/given.t
--- perl/lib/Switch/t/given.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/lib/Switch/t/given.t Mon Oct 8 06:00:05 2001
@@ -1,5 +1,10 @@
#! /usr/local/bin/perl -w
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
use Carp;
use Switch qw(Perl6 __ fallthrough);
==== //depot/perl/lib/Switch/t/nested.t#2 (xtext) ====
Index: perl/lib/Switch/t/nested.t
--- perl/lib/Switch/t/nested.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/lib/Switch/t/nested.t Mon Oct 8 06:00:05 2001
@@ -1,3 +1,10 @@
+#! /usr/local/bin/perl -w
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
use Switch;
print "1..4\n";
==== //depot/perl/lib/Switch/t/switch.t#2 (xtext) ====
Index: perl/lib/Switch/t/switch.t
--- perl/lib/Switch/t/switch.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/lib/Switch/t/switch.t Mon Oct 8 06:00:05 2001
@@ -1,5 +1,10 @@
#! /usr/local/bin/perl -w
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
use Carp;
use Switch qw(__ fallthrough);
==== //depot/perl/lib/Term/Complete.t#6 (text) ====
Index: perl/lib/Term/Complete.t
--- perl/lib/Term/Complete.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/lib/Term/Complete.t Mon Oct 8 06:00:05 2001
@@ -1,7 +1,7 @@
#!./perl
BEGIN {
- chdir 't' unless -d 't';
+ chdir 't' if -d 't';
@INC = '../lib';
}
==== //depot/perl/lib/Test/Simple/t/plan_is_noplan.t#6 (text) ====
Index: perl/lib/Test/Simple/t/plan_is_noplan.t
--- perl/lib/Test/Simple/t/plan_is_noplan.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/lib/Test/Simple/t/plan_is_noplan.t Mon Oct 8 06:00:05 2001
@@ -3,6 +3,8 @@
# This feature requires a fairly new version of Test::Harness
BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
require Test::Harness;
if( $Test::Harness::VERSION < 1.20 ) {
print "1..0\n";
==== //depot/perl/lib/Test/Simple/t/todo.t#3 (text) ====
Index: perl/lib/Test/Simple/t/todo.t
--- perl/lib/Test/Simple/t/todo.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/lib/Test/Simple/t/todo.t Mon Oct 8 06:00:05 2001
@@ -1,4 +1,7 @@
+#! /usr/local/bin/perl -w
BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
require Test::Harness;
require Test::More;
==== //depot/perl/lib/bigfloat.t#2 (xtext) ====
Index: perl/lib/bigfloat.t
--- perl/lib/bigfloat.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/lib/bigfloat.t Mon Oct 8 06:00:05 2001
@@ -1,6 +1,10 @@
#!./perl
-BEGIN { @INC = '../lib' }
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
require "bigfloat.pl";
$test = 0;
==== //depot/perl/lib/bigint.t#2 (xtext) ====
Index: perl/lib/bigint.t
--- perl/lib/bigint.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/lib/bigint.t Mon Oct 8 06:00:05 2001
@@ -1,6 +1,9 @@
#!./perl
-BEGIN { @INC = '../lib' }
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
require "bigint.pl";
$test = 0;
==== //depot/perl/lib/integer.t#3 (text) ====
Index: perl/lib/integer.t
--- perl/lib/integer.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/lib/integer.t Mon Oct 8 06:00:05 2001
@@ -1,3 +1,10 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
use integer;
use Test::More tests => 11;
==== //depot/perl/t/op/flip.t#11 (xtext) ====
Index: perl/t/op/flip.t
--- perl/t/op/flip.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/t/op/flip.t Mon Oct 8 06:00:05 2001
@@ -2,6 +2,8 @@
# $RCSfile: flip.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:52 $
+chdir 't' if -d 't';
+
print "1..10\n";
@a = (1,2,3,4,5,6,7,8,9,10,11,12);
==== //depot/perl/t/op/my_stash.t#5 (text) ====
Index: perl/t/op/my_stash.t
--- perl/t/op/my_stash.t.~1~ Mon Oct 8 06:00:05 2001
+++ perl/t/op/my_stash.t Mon Oct 8 06:00:05 2001
@@ -3,6 +3,7 @@
package Foo;
BEGIN {
+ chdir 't' if -d 't';
@INC = '../lib';
}
End of Patch.