From: Nicholas Clark Date: Sat, 6 Oct 2001 18:04:21 +0000 (+0100) Subject: Memoize tests X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5317c87c3eacba5e08202600b10b69ea57fe42f4;p=p5sagit%2Fp5-mst-13.2.git Memoize tests Message-Id: <20011006180421.J38756@plum.flirble.org> p4raw-id: //depot/perl@12345 --- diff --git a/lib/Memoize/t/array.t b/lib/Memoize/t/array.t index b7057ea..032d7c2 100755 --- a/lib/Memoize/t/array.t +++ b/lib/Memoize/t/array.t @@ -1,6 +1,9 @@ #!/usr/bin/perl -use lib '..'; +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} use Memoize; diff --git a/lib/Memoize/t/array_confusion.t b/lib/Memoize/t/array_confusion.t index 44847c3..a1693df 100644 --- a/lib/Memoize/t/array_confusion.t +++ b/lib/Memoize/t/array_confusion.t @@ -1,6 +1,9 @@ #!/usr/bin/perl -use lib '..'; +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} use Memoize 'memoize', 'unmemoize'; sub reff { diff --git a/lib/Memoize/t/correctness.t b/lib/Memoize/t/correctness.t index ae56787..7bd1760 100755 --- a/lib/Memoize/t/correctness.t +++ b/lib/Memoize/t/correctness.t @@ -1,6 +1,9 @@ #!/usr/bin/perl -use lib '..'; +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} use Memoize; print "1..25\n"; diff --git a/lib/Memoize/t/errors.t b/lib/Memoize/t/errors.t index 2e81cdb..5e3218d 100755 --- a/lib/Memoize/t/errors.t +++ b/lib/Memoize/t/errors.t @@ -1,6 +1,9 @@ #!/usr/bin/perl -use lib '..'; +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} use Memoize; use Config; diff --git a/lib/Memoize/t/expire.t b/lib/Memoize/t/expire.t index 497e7a9..c97f9f3 100644 --- a/lib/Memoize/t/expire.t +++ b/lib/Memoize/t/expire.t @@ -1,6 +1,9 @@ #!/usr/bin/perl -use lib '..'; +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} use Memoize; use Memoize::ExpireTest; diff --git a/lib/Memoize/t/expire_file.t b/lib/Memoize/t/expire_file.t index 9959d00..022ba18 100644 --- a/lib/Memoize/t/expire_file.t +++ b/lib/Memoize/t/expire_file.t @@ -1,6 +1,9 @@ #!/usr/bin/perl -use lib '..'; +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} use Memoize; my $n = 0; diff --git a/lib/Memoize/t/expire_module_n.t b/lib/Memoize/t/expire_module_n.t index 7e5505a..e88d2ec 100644 --- a/lib/Memoize/t/expire_module_n.t +++ b/lib/Memoize/t/expire_module_n.t @@ -1,6 +1,9 @@ #!/usr/bin/perl -use lib '..'; +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} use Memoize; my $n = 0; diff --git a/lib/Memoize/t/expire_module_t.t b/lib/Memoize/t/expire_module_t.t index 3cc3de1..73b3f08 100644 --- a/lib/Memoize/t/expire_module_t.t +++ b/lib/Memoize/t/expire_module_t.t @@ -1,6 +1,9 @@ #!/usr/bin/perl -use lib '..'; +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} use Memoize; BEGIN { eval {require Time::HiRes}; diff --git a/lib/Memoize/t/flush.t b/lib/Memoize/t/flush.t index bf9262e..9d13536 100644 --- a/lib/Memoize/t/flush.t +++ b/lib/Memoize/t/flush.t @@ -1,6 +1,9 @@ #!/usr/bin/perl -use lib '..'; +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} use Memoize 'flush_cache', 'memoize'; print "1..8\n"; print "ok 1\n"; diff --git a/lib/Memoize/t/normalize.t b/lib/Memoize/t/normalize.t index a920ff4..228c074 100755 --- a/lib/Memoize/t/normalize.t +++ b/lib/Memoize/t/normalize.t @@ -1,6 +1,9 @@ #!/usr/bin/perl -use lib '..'; +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} use Memoize; print "1..7\n"; diff --git a/lib/Memoize/t/prototype.t b/lib/Memoize/t/prototype.t index f3859e3..a1c7c4d 100644 --- a/lib/Memoize/t/prototype.t +++ b/lib/Memoize/t/prototype.t @@ -1,6 +1,10 @@ #!/usr/bin/perl -use lib '..'; +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} +#use lib '..'; use Memoize; $EXPECTED_WARNING = '(no warning expected)'; diff --git a/lib/Memoize/t/speed.t b/lib/Memoize/t/speed.t index 6d21906..355b8c9 100755 --- a/lib/Memoize/t/speed.t +++ b/lib/Memoize/t/speed.t @@ -1,6 +1,9 @@ #!/usr/bin/perl -use lib '..'; +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} use Memoize; if (-e '.fast') { diff --git a/lib/Memoize/t/tie.t b/lib/Memoize/t/tie.t index e058674..c2b3ff1 100755 --- a/lib/Memoize/t/tie.t +++ b/lib/Memoize/t/tie.t @@ -1,6 +1,10 @@ #!/usr/bin/perl -use lib qw(. ..); +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} +#use lib qw(. ..); use Memoize 0.52 qw(memoize unmemoize); use Fcntl; eval {require Memoize::AnyDBM_File}; diff --git a/lib/Memoize/t/tie_gdbm.t b/lib/Memoize/t/tie_gdbm.t index e9f20a0..7d17cbe 100755 --- a/lib/Memoize/t/tie_gdbm.t +++ b/lib/Memoize/t/tie_gdbm.t @@ -1,6 +1,10 @@ #!/usr/bin/perl -use lib qw(. ..); +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} +#use lib qw(. ..); use Memoize 0.45 qw(memoize unmemoize); use Fcntl; diff --git a/lib/Memoize/t/tie_ndbm.t b/lib/Memoize/t/tie_ndbm.t index 0551446..8920dc9 100644 --- a/lib/Memoize/t/tie_ndbm.t +++ b/lib/Memoize/t/tie_ndbm.t @@ -1,6 +1,10 @@ #!/usr/bin/perl -use lib qw(. ..); +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} +#use lib qw(. ..); use Memoize 0.45 qw(memoize unmemoize); use Fcntl; # use Memoize::NDBM_File; diff --git a/lib/Memoize/t/tie_sdbm.t b/lib/Memoize/t/tie_sdbm.t index 936a7c9..3da203c 100644 --- a/lib/Memoize/t/tie_sdbm.t +++ b/lib/Memoize/t/tie_sdbm.t @@ -1,6 +1,10 @@ #!/usr/bin/perl -use lib qw(. ..); +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} +#use lib qw(. ..); use Memoize 0.45 qw(memoize unmemoize); use Fcntl; # use Memoize::SDBM_File; diff --git a/lib/Memoize/t/tie_storable.t b/lib/Memoize/t/tie_storable.t index 0421755..17bf93d 100644 --- a/lib/Memoize/t/tie_storable.t +++ b/lib/Memoize/t/tie_storable.t @@ -1,7 +1,10 @@ #!/usr/bin/perl # -*- mode: perl; perl-indent-level: 2 -*- -use lib qw(. ..); +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} use Memoize 0.45 qw(memoize unmemoize); # $Memoize::Storable::Verbose = 0; diff --git a/lib/Memoize/t/tiefeatures.t b/lib/Memoize/t/tiefeatures.t index 7306d9f..bdabb28 100755 --- a/lib/Memoize/t/tiefeatures.t +++ b/lib/Memoize/t/tiefeatures.t @@ -1,5 +1,9 @@ #!/usr/bin/perl +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} use lib 'blib/lib'; use Memoize 0.45 qw(memoize unmemoize); use Fcntl; diff --git a/lib/Memoize/t/unmemoize.t b/lib/Memoize/t/unmemoize.t index 82b318c..38b61b6 100755 --- a/lib/Memoize/t/unmemoize.t +++ b/lib/Memoize/t/unmemoize.t @@ -1,6 +1,9 @@ #!/usr/bin/perl -use lib '..'; +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} use Memoize qw(memoize unmemoize); print "1..5\n";