From 768fd1576db46dc9f6fdf8c63b324c4bc79a426a Mon Sep 17 00:00:00 2001 From: Yves Orton Date: Wed, 18 Oct 2006 22:51:41 +0200 Subject: Re: Off by one in the trie code? Message-ID: <9b18b3110610181151i3ca438cdied769ebaa4255079@mail.gmail.com> change test files that do a require "./test.pl"; without a BEGIN block to ensure prototypes are seen, plus fix any breakage this reveals. p4raw-id: //depot/perl@29056 --- ext/Devel/Peek/t/Peek.t | 2 +- ext/POSIX/t/posix.t | 2 +- lib/vmsish.t | 2 +- t/comp/parser.t | 2 +- t/comp/utf.t | 2 +- t/io/argv.t | 2 +- t/io/utf8.t | 8 ++++---- t/op/stash.t | 2 +- t/run/switchC.t | 2 +- t/run/switchd.t | 2 +- t/run/switches.t | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ext/Devel/Peek/t/Peek.t b/ext/Devel/Peek/t/Peek.t index cf20f8b69c..57e84d752d 100644 --- a/ext/Devel/Peek/t/Peek.t +++ b/ext/Devel/Peek/t/Peek.t @@ -10,7 +10,7 @@ BEGIN { } } -require "./test.pl"; +BEGIN { require "./test.pl"; } use Devel::Peek; diff --git a/ext/POSIX/t/posix.t b/ext/POSIX/t/posix.t index 58b3a4843d..6d7da842b9 100644 --- a/ext/POSIX/t/posix.t +++ b/ext/POSIX/t/posix.t @@ -10,7 +10,7 @@ BEGIN { } } -require "./test.pl"; +BEGIN { require "./test.pl"; } plan(tests => 65); use POSIX qw(fcntl_h signal_h limits_h _exit getcwd open read strftime write diff --git a/lib/vmsish.t b/lib/vmsish.t index f40e434e54..847d1a6f30 100644 --- a/lib/vmsish.t +++ b/lib/vmsish.t @@ -10,7 +10,7 @@ $perl = VMS::Filespec::vmsify($perl) if $^O eq 'VMS'; my $Invoke_Perl = qq(MCR $perl "-I[-.lib]"); -require "./test.pl"; +BEGIN { require "./test.pl"; } plan(tests => 25); SKIP: { diff --git a/t/comp/parser.t b/t/comp/parser.t index a05085879f..2599bdf5b3 100644 --- a/t/comp/parser.t +++ b/t/comp/parser.t @@ -8,7 +8,7 @@ BEGIN { @INC = '../lib'; } -require "./test.pl"; +BEGIN { require "./test.pl"; } plan( tests => 60 ); eval '%@x=0;'; diff --git a/t/comp/utf.t b/t/comp/utf.t index 90a9e5e11b..f0673eb964 100644 --- a/t/comp/utf.t +++ b/t/comp/utf.t @@ -18,7 +18,7 @@ BEGIN { } } -require "./test.pl"; +BEGIN { require "./test.pl"; } plan(tests => 15); diff --git a/t/io/argv.t b/t/io/argv.t index 8a63c65833..c24dad5d4a 100755 --- a/t/io/argv.t +++ b/t/io/argv.t @@ -5,7 +5,7 @@ BEGIN { @INC = '../lib'; } -require "./test.pl"; +BEGIN { require "./test.pl"; } plan(tests => 22); diff --git a/t/io/utf8.t b/t/io/utf8.t index 22f392ac78..2117338d9d 100755 --- a/t/io/utf8.t +++ b/t/io/utf8.t @@ -11,7 +11,7 @@ BEGIN { no utf8; # needed for use utf8 not griping about the raw octets -require "./test.pl"; +BEGIN { require "./test.pl"; } plan(tests => 55); @@ -231,7 +231,7 @@ is($failed, undef); print F chr(0x100); close(F); - isnt( defined $@ ); + isnt( defined $@, !0 ); undef $@; open F, ">a"; @@ -239,7 +239,7 @@ is($failed, undef); print F chr(0x100); close(F); - isnt( defined $@ ); + isnt( defined $@, !0 ); no warnings 'utf8'; @@ -248,7 +248,7 @@ is($failed, undef); print F chr(0x100); close(F); - isnt( defined $@ ); + isnt( defined $@, !0 ); use warnings 'utf8'; diff --git a/t/op/stash.t b/t/op/stash.t index 53abbddc9a..4d8bc7c54d 100644 --- a/t/op/stash.t +++ b/t/op/stash.t @@ -5,7 +5,7 @@ BEGIN { @INC = qw(../lib); } -require "./test.pl"; +BEGIN { require "./test.pl"; } plan( tests => 13 ); diff --git a/t/run/switchC.t b/t/run/switchC.t index fd05e133dd..082f972b7f 100644 --- a/t/run/switchC.t +++ b/t/run/switchC.t @@ -11,7 +11,7 @@ BEGIN { } } -require "./test.pl"; +BEGIN { require "./test.pl"; } plan(tests => 6); diff --git a/t/run/switchd.t b/t/run/switchd.t index b840a98b26..30ae53bfcd 100644 --- a/t/run/switchd.t +++ b/t/run/switchd.t @@ -5,7 +5,7 @@ BEGIN { @INC = qw(../lib lib); } -require "./test.pl"; +BEGIN { require "./test.pl"; } # This test depends on t/lib/Devel/switchd.pm. diff --git a/t/run/switches.t b/t/run/switches.t index 1f6cf66131..7a778a470c 100644 --- a/t/run/switches.t +++ b/t/run/switches.t @@ -9,7 +9,7 @@ BEGIN { @INC = '../lib'; } -require "./test.pl"; +BEGIN { require "./test.pl"; } plan(tests => 31); -- cgit v1.2.1