summaryrefslogtreecommitdiff
path: root/lib/FileCache
diff options
context:
space:
mode:
Diffstat (limited to 'lib/FileCache')
-rw-r--r--lib/FileCache/t/01open.t8
-rw-r--r--lib/FileCache/t/02maxopen.t8
-rw-r--r--lib/FileCache/t/03append.t8
-rw-r--r--lib/FileCache/t/04twoarg.t14
-rw-r--r--lib/FileCache/t/05override.t14
-rw-r--r--lib/FileCache/t/06export.t12
-rw-r--r--lib/FileCache/t/07noimport.t6
7 files changed, 51 insertions, 19 deletions
diff --git a/lib/FileCache/t/01open.t b/lib/FileCache/t/01open.t
index 75da3b28d4..ee207ddf93 100644
--- a/lib/FileCache/t/01open.t
+++ b/lib/FileCache/t/01open.t
@@ -1,4 +1,12 @@
#!./perl
+
+BEGIN {
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = qw(../lib);
+ }
+}
+
use FileCache;
use vars qw(@files);
BEGIN {
diff --git a/lib/FileCache/t/02maxopen.t b/lib/FileCache/t/02maxopen.t
index 603edebc7f..2f737eb1c8 100644
--- a/lib/FileCache/t/02maxopen.t
+++ b/lib/FileCache/t/02maxopen.t
@@ -1,4 +1,12 @@
#!./perl
+
+BEGIN {
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = qw(../lib);
+ }
+}
+
use FileCache maxopen=>2;
use Test;
use vars qw(@files);
diff --git a/lib/FileCache/t/03append.t b/lib/FileCache/t/03append.t
index a6ba6f3aac..5afc513eb6 100644
--- a/lib/FileCache/t/03append.t
+++ b/lib/FileCache/t/03append.t
@@ -1,4 +1,12 @@
#!./perl
+
+BEGIN {
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = qw(../lib);
+ }
+}
+
use FileCache maxopen=>2;
use vars qw(@files);
BEGIN {
diff --git a/lib/FileCache/t/04twoarg.t b/lib/FileCache/t/04twoarg.t
index 66da9719a2..40bae6dcbf 100644
--- a/lib/FileCache/t/04twoarg.t
+++ b/lib/FileCache/t/04twoarg.t
@@ -1,12 +1,14 @@
#!./perl
-BEGIN {
- use FileCache;
- chdir 't' if -d 't';
- #For tests within the perl distribution
- @INC = '../lib' if -d '../lib';
- END;
+BEGIN {
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = qw(../lib);
+ }
}
+
+use FileCache;
+
END{
unlink('foo');
}
diff --git a/lib/FileCache/t/05override.t b/lib/FileCache/t/05override.t
index a807c25640..b7b4083433 100644
--- a/lib/FileCache/t/05override.t
+++ b/lib/FileCache/t/05override.t
@@ -1,12 +1,14 @@
#!./perl
-BEGIN {
- use FileCache;
- chdir 't' if -d 't';
- #For tests within the perl distribution
- @INC = '../lib' if -d '../lib';
- END;
+BEGIN {
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = qw(../lib);
+ }
}
+
+use FileCache;
+
END{
unlink("Foo_Bar");
}
diff --git a/lib/FileCache/t/06export.t b/lib/FileCache/t/06export.t
index 60f55a3182..67d5996e74 100644
--- a/lib/FileCache/t/06export.t
+++ b/lib/FileCache/t/06export.t
@@ -1,11 +1,13 @@
#!./perl
-BEGIN {
- chdir 't' if -d 't';
- #For tests within the perl distribution
- @INC = '../lib' if -d '../lib';
- END;
+BEGIN {
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = qw(../lib);
+ }
+}
+BEGIN {
# Functions exported by FileCache;
@funcs = qw[cacheout cacheout_close];
$i = 0;
diff --git a/lib/FileCache/t/07noimport.t b/lib/FileCache/t/07noimport.t
index d2f926ce5c..a6e024d002 100644
--- a/lib/FileCache/t/07noimport.t
+++ b/lib/FileCache/t/07noimport.t
@@ -1,8 +1,10 @@
#!./perl -w
BEGIN {
- chdir 't';
- @INC = '../lib';
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = qw(../lib);
+ }
}
require './test.pl';