diff options
author | Nicholas Clark <nick@ccl4.org> | 2001-10-07 21:53:33 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-08 11:53:30 +0000 |
commit | 88587957d5515b280bc1becf23e9f6520d5dce08 (patch) | |
tree | 9bce880697d5b08985c9b38192d4549c30054862 | |
parent | e3b2f2afc4d28243cf088b06f65acc79e00144f5 (diff) | |
download | perl-88587957d5515b280bc1becf23e9f6520d5dce08.tar.gz |
& what's to be done for 5.8.0?
Message-ID: <20011007205333.S38756@plum.flirble.org>
p4raw-id: //depot/perl@12356
-rwxr-xr-x | ext/B/t/showlex.t | 3 | ||||
-rwxr-xr-x | ext/B/t/stash.t | 3 | ||||
-rw-r--r-- | ext/Cwd/t/taint.t | 2 | ||||
-rwxr-xr-x | ext/DB_File/t/db-btree.t | 1 | ||||
-rwxr-xr-x | ext/DB_File/t/db-hash.t | 1 | ||||
-rwxr-xr-x | ext/DB_File/t/db-recno.t | 1 | ||||
-rw-r--r-- | ext/Fcntl/t/fcntl.t | 5 | ||||
-rw-r--r-- | lib/CGI/t/carp.t | 11 | ||||
-rw-r--r-- | lib/CGI/t/cookie.t | 5 | ||||
-rw-r--r-- | lib/File/Find/t/taint.t | 5 | ||||
-rwxr-xr-x | lib/FindBin.t | 4 | ||||
-rw-r--r-- | lib/Net/t/ftp.t | 5 | ||||
-rw-r--r-- | lib/Net/t/hostname.t | 6 | ||||
-rw-r--r-- | lib/Net/t/nntp.t | 5 | ||||
-rw-r--r-- | lib/Net/t/smtp.t | 5 | ||||
-rwxr-xr-x | lib/Switch/t/given.t | 5 | ||||
-rwxr-xr-x | lib/Switch/t/nested.t | 7 | ||||
-rwxr-xr-x | lib/Switch/t/switch.t | 5 | ||||
-rw-r--r-- | lib/Term/Complete.t | 2 | ||||
-rw-r--r-- | lib/Test/Simple/t/plan_is_noplan.t | 2 | ||||
-rw-r--r-- | lib/Test/Simple/t/todo.t | 3 | ||||
-rwxr-xr-x | lib/bigfloat.t | 6 | ||||
-rwxr-xr-x | lib/bigint.t | 5 | ||||
-rw-r--r-- | lib/integer.t | 7 | ||||
-rwxr-xr-x | t/op/flip.t | 2 | ||||
-rw-r--r-- | t/op/my_stash.t | 1 |
26 files changed, 97 insertions, 10 deletions
diff --git a/ext/B/t/showlex.t b/ext/B/t/showlex.t index 41dbd3272f..1322235699 100755 --- a/ext/B/t/showlex.t +++ b/ext/B/t/showlex.t @@ -1,8 +1,11 @@ #!./perl BEGIN { + chdir 't' if -d 't'; if ($^O eq 'MacOS') { @INC = qw(: ::lib ::macos:lib); + } else { + @INC = '../lib'; } } diff --git a/ext/B/t/stash.t b/ext/B/t/stash.t index ba58d172b9..b83493fe34 100755 --- a/ext/B/t/stash.t +++ b/ext/B/t/stash.t @@ -1,8 +1,11 @@ #!./perl BEGIN { + chdir 't' if -d 't'; if ($^O eq 'MacOS') { @INC = qw(: ::lib ::macos:lib); + } else { + @INC = '../lib'; } } diff --git a/ext/Cwd/t/taint.t b/ext/Cwd/t/taint.t index 036b2b1b8e..74e2d65d00 100644 --- a/ext/Cwd/t/taint.t +++ b/ext/Cwd/t/taint.t @@ -17,5 +17,5 @@ sub is_tainted { 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" ); diff --git a/ext/DB_File/t/db-btree.t b/ext/DB_File/t/db-btree.t index 2374810968..905cbe1fdf 100755 --- a/ext/DB_File/t/db-btree.t +++ b/ext/DB_File/t/db-btree.t @@ -1,6 +1,7 @@ #!./perl -w BEGIN { + chdir 't' if -d 't'; @INC = '../lib'; require Config; import Config; if ($Config{'extensions'} !~ /\bDB_File\b/) { diff --git a/ext/DB_File/t/db-hash.t b/ext/DB_File/t/db-hash.t index 1dbb21d5f1..12b0848fa2 100755 --- a/ext/DB_File/t/db-hash.t +++ b/ext/DB_File/t/db-hash.t @@ -1,6 +1,7 @@ #!./perl -w BEGIN { + chdir 't' if -d 't'; @INC = '../lib'; require Config; import Config; if ($Config{'extensions'} !~ /\bDB_File\b/) { diff --git a/ext/DB_File/t/db-recno.t b/ext/DB_File/t/db-recno.t index 13c635591a..813c47d477 100755 --- a/ext/DB_File/t/db-recno.t +++ b/ext/DB_File/t/db-recno.t @@ -1,6 +1,7 @@ #!./perl -w BEGIN { + chdir 't' if -d 't'; @INC = '../lib'; require Config; import Config; if ($Config{'extensions'} !~ /\bDB_File\b/) { diff --git a/ext/Fcntl/t/fcntl.t b/ext/Fcntl/t/fcntl.t index 24ade27c92..02fd95823e 100644 --- a/ext/Fcntl/t/fcntl.t +++ b/ext/Fcntl/t/fcntl.t @@ -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, diff --git a/lib/CGI/t/carp.t b/lib/CGI/t/carp.t index e6a91d1903..1eebef937a 100644 --- a/lib/CGI/t/carp.t +++ b/lib/CGI/t/carp.t @@ -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 @@ is(@CGI::Carp::WARNINGS, 0, "_warn not called"); # 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 @@ untie *STDOUT; 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"); diff --git a/lib/CGI/t/cookie.t b/lib/CGI/t/cookie.t index 25b6a3a210..a2012e556b 100644 --- a/lib/CGI/t/cookie.t +++ b/lib/CGI/t/cookie.t @@ -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); diff --git a/lib/File/Find/t/taint.t b/lib/File/Find/t/taint.t index 796402d442..73006e50c0 100644 --- a/lib/File/Find/t/taint.t +++ b/lib/File/Find/t/taint.t @@ -6,12 +6,15 @@ my %Expect_Name = (); # what we expect for $File::Find::name/fullname 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{$_} =~ /(.*)/; } diff --git a/lib/FindBin.t b/lib/FindBin.t index d07ce755ca..ebca15b560 100755 --- a/lib/FindBin.t +++ b/lib/FindBin.t @@ -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"; diff --git a/lib/Net/t/ftp.t b/lib/Net/t/ftp.t index 46304dbc22..ec323d0307 100644 --- a/lib/Net/t/ftp.t +++ b/lib/Net/t/ftp.t @@ -1,5 +1,10 @@ #!./perl -w +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} + use Net::Config; use Net::FTP; diff --git a/lib/Net/t/hostname.t b/lib/Net/t/hostname.t index 3e55ace019..d743dd44ea 100644 --- a/lib/Net/t/hostname.t +++ b/lib/Net/t/hostname.t @@ -1,3 +1,9 @@ +#!./perl -w + +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} use Net::Domain qw(hostname domainname hostdomain); use Net::Config; diff --git a/lib/Net/t/nntp.t b/lib/Net/t/nntp.t index 1afb588264..e7a42c18c4 100644 --- a/lib/Net/t/nntp.t +++ b/lib/Net/t/nntp.t @@ -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); diff --git a/lib/Net/t/smtp.t b/lib/Net/t/smtp.t index 55607fe993..c7c3862ab6 100644 --- a/lib/Net/t/smtp.t +++ b/lib/Net/t/smtp.t @@ -1,5 +1,10 @@ #!./perl -w +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} + use Net::Config; use Net::SMTP; diff --git a/lib/Switch/t/given.t b/lib/Switch/t/given.t index 57e72de38d..d47541a9cb 100755 --- a/lib/Switch/t/given.t +++ b/lib/Switch/t/given.t @@ -1,5 +1,10 @@ #! /usr/local/bin/perl -w +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} + use Carp; use Switch qw(Perl6 __ fallthrough); diff --git a/lib/Switch/t/nested.t b/lib/Switch/t/nested.t index 032d3a6aef..b4aceac345 100755 --- a/lib/Switch/t/nested.t +++ b/lib/Switch/t/nested.t @@ -1,3 +1,10 @@ +#! /usr/local/bin/perl -w + +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} + use Switch; print "1..4\n"; diff --git a/lib/Switch/t/switch.t b/lib/Switch/t/switch.t index 7b147c0d9e..5f5451d34e 100755 --- a/lib/Switch/t/switch.t +++ b/lib/Switch/t/switch.t @@ -1,5 +1,10 @@ #! /usr/local/bin/perl -w +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} + use Carp; use Switch qw(__ fallthrough); diff --git a/lib/Term/Complete.t b/lib/Term/Complete.t index 2e83971615..b73baf0c90 100644 --- a/lib/Term/Complete.t +++ b/lib/Term/Complete.t @@ -1,7 +1,7 @@ #!./perl BEGIN { - chdir 't' unless -d 't'; + chdir 't' if -d 't'; @INC = '../lib'; } diff --git a/lib/Test/Simple/t/plan_is_noplan.t b/lib/Test/Simple/t/plan_is_noplan.t index dd0833c352..98e962ac39 100644 --- a/lib/Test/Simple/t/plan_is_noplan.t +++ b/lib/Test/Simple/t/plan_is_noplan.t @@ -3,6 +3,8 @@ package My::Test; # 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"; diff --git a/lib/Test/Simple/t/todo.t b/lib/Test/Simple/t/todo.t index 70ef083a00..7cbde9519c 100644 --- a/lib/Test/Simple/t/todo.t +++ b/lib/Test/Simple/t/todo.t @@ -1,4 +1,7 @@ +#! /usr/local/bin/perl -w BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; require Test::Harness; require Test::More; diff --git a/lib/bigfloat.t b/lib/bigfloat.t index 8e0a0ef724..d67d13d1d4 100755 --- a/lib/bigfloat.t +++ b/lib/bigfloat.t @@ -1,6 +1,10 @@ #!./perl -BEGIN { @INC = '../lib' } +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} + require "bigfloat.pl"; $test = 0; diff --git a/lib/bigint.t b/lib/bigint.t index 034c5c6457..569db20667 100755 --- a/lib/bigint.t +++ b/lib/bigint.t @@ -1,6 +1,9 @@ #!./perl -BEGIN { @INC = '../lib' } +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} require "bigint.pl"; $test = 0; diff --git a/lib/integer.t b/lib/integer.t index a74c4045f0..946103d8d1 100644 --- a/lib/integer.t +++ b/lib/integer.t @@ -1,3 +1,10 @@ +#!./perl + +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} + use integer; use Test::More tests => 11; diff --git a/t/op/flip.t b/t/op/flip.t index 99b22eff94..d9fa736d54 100755 --- a/t/op/flip.t +++ b/t/op/flip.t @@ -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); diff --git a/t/op/my_stash.t b/t/op/my_stash.t index 5a131830be..1e93fc7c63 100644 --- a/t/op/my_stash.t +++ b/t/op/my_stash.t @@ -3,6 +3,7 @@ package Foo; BEGIN { + chdir 't' if -d 't'; @INC = '../lib'; } |