From: Rafael Garcia-Suarez Date: Mon, 26 Jun 2006 16:50:58 +0000 (+0000) Subject: Adjust test preambles for Hash::Util::FieldHash tests to change X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=df6ac08fe0776dbc088d1819a5a068750b636a18;p=p5sagit%2Fp5-mst-13.2.git Adjust test preambles for Hash::Util::FieldHash tests to change the @INC path only when testing inside the core p4raw-id: //depot/perl@28432 --- diff --git a/ext/Hash/Util/FieldHash/t/01_load.t b/ext/Hash/Util/FieldHash/t/01_load.t index 952f2a3..a881cea 100644 --- a/ext/Hash/Util/FieldHash/t/01_load.t +++ b/ext/Hash/Util/FieldHash/t/01_load.t @@ -1,8 +1,10 @@ #!perl BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; + if ($ENV{PERL_CORE}) { + chdir 't' if -d 't'; + @INC = '../lib'; + } } use strict; use warnings; diff --git a/ext/Hash/Util/FieldHash/t/02_function.t b/ext/Hash/Util/FieldHash/t/02_function.t index a89bf2e..877d85e 100644 --- a/ext/Hash/Util/FieldHash/t/02_function.t +++ b/ext/Hash/Util/FieldHash/t/02_function.t @@ -1,8 +1,10 @@ #!perl BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; + if ($ENV{PERL_CORE}) { + chdir 't' if -d 't'; + @INC = '../lib'; + } } use strict; use warnings; diff --git a/ext/Hash/Util/FieldHash/t/03_class.t b/ext/Hash/Util/FieldHash/t/03_class.t index 027b43c..f064fcc 100644 --- a/ext/Hash/Util/FieldHash/t/03_class.t +++ b/ext/Hash/Util/FieldHash/t/03_class.t @@ -1,8 +1,10 @@ #!perl BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; + if ($ENV{PERL_CORE}) { + chdir 't' if -d 't'; + @INC = '../lib'; + } } use strict; use warnings; diff --git a/ext/Hash/Util/FieldHash/t/04_thread.t b/ext/Hash/Util/FieldHash/t/04_thread.t index 0693522..5197b90 100644 --- a/ext/Hash/Util/FieldHash/t/04_thread.t +++ b/ext/Hash/Util/FieldHash/t/04_thread.t @@ -1,8 +1,10 @@ #!perl BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; + if ($ENV{PERL_CORE}) { + chdir 't' if -d 't'; + @INC = '../lib'; + } } use strict; use warnings; diff --git a/ext/Hash/Util/FieldHash/t/05_perlhook.t b/ext/Hash/Util/FieldHash/t/05_perlhook.t index 73f8654..bc9ff95 100644 --- a/ext/Hash/Util/FieldHash/t/05_perlhook.t +++ b/ext/Hash/Util/FieldHash/t/05_perlhook.t @@ -1,8 +1,10 @@ #!perl BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; + if ($ENV{PERL_CORE}) { + chdir 't' if -d 't'; + @INC = '../lib'; + } } use strict; use warnings; diff --git a/ext/Hash/Util/FieldHash/t/10_hash.t b/ext/Hash/Util/FieldHash/t/10_hash.t index 80de722..5c56675 100644 --- a/ext/Hash/Util/FieldHash/t/10_hash.t +++ b/ext/Hash/Util/FieldHash/t/10_hash.t @@ -1,8 +1,10 @@ #!./perl -w BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; + if ($ENV{PERL_CORE}) { + chdir 't' if -d 't'; + @INC = '../lib'; + } } use Test::More; diff --git a/ext/Hash/Util/FieldHash/t/11_hashassign.t b/ext/Hash/Util/FieldHash/t/11_hashassign.t index 205f36e..a42682f 100644 --- a/ext/Hash/Util/FieldHash/t/11_hashassign.t +++ b/ext/Hash/Util/FieldHash/t/11_hashassign.t @@ -1,8 +1,10 @@ #!./perl -w BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; + if ($ENV{PERL_CORE}) { + chdir 't' if -d 't'; + @INC = '../lib'; + } } use Test::More; diff --git a/ext/Hash/Util/FieldHash/t/12_hashwarn.t b/ext/Hash/Util/FieldHash/t/12_hashwarn.t index 94509d2..9d4474d 100644 --- a/ext/Hash/Util/FieldHash/t/12_hashwarn.t +++ b/ext/Hash/Util/FieldHash/t/12_hashwarn.t @@ -1,8 +1,10 @@ #!./perl BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; + if ($ENV{PERL_CORE}) { + chdir 't' if -d 't'; + @INC = '../lib'; + } } use Test::More;