Change 12345 by ams@ams-lustre on 2001/10/06 17:39:53
Subject: [PATCH] Memoize tests
From: Nicholas Clark <[EMAIL PROTECTED]>
Date: Sat, 6 Oct 2001 18:04:21 +0100
Message-Id: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/lib/Memoize/t/array.t#2 edit
... //depot/perl/lib/Memoize/t/array_confusion.t#2 edit
... //depot/perl/lib/Memoize/t/correctness.t#2 edit
... //depot/perl/lib/Memoize/t/errors.t#4 edit
... //depot/perl/lib/Memoize/t/expire.t#3 edit
... //depot/perl/lib/Memoize/t/expire_file.t#3 edit
... //depot/perl/lib/Memoize/t/expire_module_n.t#3 edit
... //depot/perl/lib/Memoize/t/expire_module_t.t#5 edit
... //depot/perl/lib/Memoize/t/flush.t#2 edit
... //depot/perl/lib/Memoize/t/normalize.t#2 edit
... //depot/perl/lib/Memoize/t/prototype.t#2 edit
... //depot/perl/lib/Memoize/t/speed.t#4 edit
... //depot/perl/lib/Memoize/t/tie.t#6 edit
... //depot/perl/lib/Memoize/t/tie_gdbm.t#3 edit
... //depot/perl/lib/Memoize/t/tie_ndbm.t#5 edit
... //depot/perl/lib/Memoize/t/tie_sdbm.t#7 edit
... //depot/perl/lib/Memoize/t/tie_storable.t#4 edit
... //depot/perl/lib/Memoize/t/tiefeatures.t#2 edit
... //depot/perl/lib/Memoize/t/unmemoize.t#2 edit
Differences ...
==== //depot/perl/lib/Memoize/t/array.t#2 (xtext) ====
Index: perl/lib/Memoize/t/array.t
--- perl/lib/Memoize/t/array.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/array.t Sat Oct 6 11:45:06 2001
@@ -1,6 +1,9 @@
#!/usr/bin/perl
-use lib '..';
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
use Memoize;
==== //depot/perl/lib/Memoize/t/array_confusion.t#2 (text) ====
Index: perl/lib/Memoize/t/array_confusion.t
--- perl/lib/Memoize/t/array_confusion.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/array_confusion.t Sat Oct 6 11:45:06 2001
@@ -1,6 +1,9 @@
#!/usr/bin/perl
-use lib '..';
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
use Memoize 'memoize', 'unmemoize';
sub reff {
==== //depot/perl/lib/Memoize/t/correctness.t#2 (xtext) ====
Index: perl/lib/Memoize/t/correctness.t
--- perl/lib/Memoize/t/correctness.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/correctness.t Sat Oct 6 11:45:06 2001
@@ -1,6 +1,9 @@
#!/usr/bin/perl
-use lib '..';
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
use Memoize;
print "1..25\n";
==== //depot/perl/lib/Memoize/t/errors.t#4 (xtext) ====
Index: perl/lib/Memoize/t/errors.t
--- perl/lib/Memoize/t/errors.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/errors.t Sat Oct 6 11:45:06 2001
@@ -1,6 +1,9 @@
#!/usr/bin/perl
-use lib '..';
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
use Memoize;
use Config;
==== //depot/perl/lib/Memoize/t/expire.t#3 (text) ====
Index: perl/lib/Memoize/t/expire.t
--- perl/lib/Memoize/t/expire.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/expire.t Sat Oct 6 11:45:06 2001
@@ -1,6 +1,9 @@
#!/usr/bin/perl
-use lib '..';
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
use Memoize;
use Memoize::ExpireTest;
==== //depot/perl/lib/Memoize/t/expire_file.t#3 (text) ====
Index: perl/lib/Memoize/t/expire_file.t
--- perl/lib/Memoize/t/expire_file.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/expire_file.t Sat Oct 6 11:45:06 2001
@@ -1,6 +1,9 @@
#!/usr/bin/perl
-use lib '..';
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
use Memoize;
my $n = 0;
==== //depot/perl/lib/Memoize/t/expire_module_n.t#3 (text) ====
Index: perl/lib/Memoize/t/expire_module_n.t
--- perl/lib/Memoize/t/expire_module_n.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/expire_module_n.t Sat Oct 6 11:45:06 2001
@@ -1,6 +1,9 @@
#!/usr/bin/perl
-use lib '..';
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
use Memoize;
my $n = 0;
==== //depot/perl/lib/Memoize/t/expire_module_t.t#5 (text) ====
Index: perl/lib/Memoize/t/expire_module_t.t
--- perl/lib/Memoize/t/expire_module_t.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/expire_module_t.t Sat Oct 6 11:45:06 2001
@@ -1,6 +1,9 @@
#!/usr/bin/perl
-use lib '..';
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
use Memoize;
BEGIN {
eval {require Time::HiRes};
==== //depot/perl/lib/Memoize/t/flush.t#2 (text) ====
Index: perl/lib/Memoize/t/flush.t
--- perl/lib/Memoize/t/flush.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/flush.t Sat Oct 6 11:45:06 2001
@@ -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";
==== //depot/perl/lib/Memoize/t/normalize.t#2 (xtext) ====
Index: perl/lib/Memoize/t/normalize.t
--- perl/lib/Memoize/t/normalize.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/normalize.t Sat Oct 6 11:45:06 2001
@@ -1,6 +1,9 @@
#!/usr/bin/perl
-use lib '..';
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
use Memoize;
print "1..7\n";
==== //depot/perl/lib/Memoize/t/prototype.t#2 (text) ====
Index: perl/lib/Memoize/t/prototype.t
--- perl/lib/Memoize/t/prototype.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/prototype.t Sat Oct 6 11:45:06 2001
@@ -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)';
==== //depot/perl/lib/Memoize/t/speed.t#4 (xtext) ====
Index: perl/lib/Memoize/t/speed.t
--- perl/lib/Memoize/t/speed.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/speed.t Sat Oct 6 11:45:06 2001
@@ -1,6 +1,9 @@
#!/usr/bin/perl
-use lib '..';
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
use Memoize;
if (-e '.fast') {
==== //depot/perl/lib/Memoize/t/tie.t#6 (xtext) ====
Index: perl/lib/Memoize/t/tie.t
--- perl/lib/Memoize/t/tie.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/tie.t Sat Oct 6 11:45:06 2001
@@ -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};
==== //depot/perl/lib/Memoize/t/tie_gdbm.t#3 (xtext) ====
Index: perl/lib/Memoize/t/tie_gdbm.t
--- perl/lib/Memoize/t/tie_gdbm.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/tie_gdbm.t Sat Oct 6 11:45:06 2001
@@ -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;
==== //depot/perl/lib/Memoize/t/tie_ndbm.t#5 (text) ====
Index: perl/lib/Memoize/t/tie_ndbm.t
--- perl/lib/Memoize/t/tie_ndbm.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/tie_ndbm.t Sat Oct 6 11:45:06 2001
@@ -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;
==== //depot/perl/lib/Memoize/t/tie_sdbm.t#7 (text) ====
Index: perl/lib/Memoize/t/tie_sdbm.t
--- perl/lib/Memoize/t/tie_sdbm.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/tie_sdbm.t Sat Oct 6 11:45:06 2001
@@ -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;
==== //depot/perl/lib/Memoize/t/tie_storable.t#4 (text) ====
Index: perl/lib/Memoize/t/tie_storable.t
--- perl/lib/Memoize/t/tie_storable.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/tie_storable.t Sat Oct 6 11:45:06 2001
@@ -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;
==== //depot/perl/lib/Memoize/t/tiefeatures.t#2 (xtext) ====
Index: perl/lib/Memoize/t/tiefeatures.t
--- perl/lib/Memoize/t/tiefeatures.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/tiefeatures.t Sat Oct 6 11:45:06 2001
@@ -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;
==== //depot/perl/lib/Memoize/t/unmemoize.t#2 (xtext) ====
Index: perl/lib/Memoize/t/unmemoize.t
--- perl/lib/Memoize/t/unmemoize.t.~1~ Sat Oct 6 11:45:06 2001
+++ perl/lib/Memoize/t/unmemoize.t Sat Oct 6 11:45:06 2001
@@ -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";
End of Patch.