From: Yves Orton Date: Wed, 18 Oct 2006 20:51:41 +0000 (+0200) Subject: Re: Off by one in the trie code? X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=768fd1576db46dc9f6fdf8c63b324c4bc79a426a;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/ext/Devel/Peek/t/Peek.t b/ext/Devel/Peek/t/Peek.t index cf20f8b..57e84d7 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 58b3a48..6d7da84 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 f40e434..847d1a6 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 a050858..2599bdf 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 90a9e5e..f0673eb 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 8a63c65..c24dad5 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 22f392a..2117338 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 53abbdd..4d8bc7c 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 fd05e13..082f972 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 b840a98..30ae53b 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 1f6cf66..7a778a4 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);