summaryrefslogtreecommitdiff
path: root/ext/B
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-08-30 13:42:44 +0100
committerNicholas Clark <nick@ccl4.org>2009-08-30 13:43:09 +0100
commit74517a3a4d32901662e188ad8c7a66d4500d3ff3 (patch)
tree21394b2ad39f71e60bbc3b85b757847167436e33 /ext/B
parenta65b57ffe58c7e9daa34b18e13c8a127e7e499f2 (diff)
downloadperl-74517a3a4d32901662e188ad8c7a66d4500d3ff3.tar.gz
Remove the $ENV{PERL_CORE} boilerplate from B's tests.
Diffstat (limited to 'ext/B')
-rw-r--r--ext/B/t/b.t12
-rw-r--r--ext/B/t/concise-xs.t8
-rw-r--r--ext/B/t/concise.t8
-rw-r--r--ext/B/t/f_map.t8
-rw-r--r--ext/B/t/f_sort.t8
-rw-r--r--ext/B/t/o.t8
-rw-r--r--ext/B/t/optree_check.t8
-rw-r--r--ext/B/t/optree_concise.t8
-rw-r--r--ext/B/t/optree_constants.t8
-rw-r--r--ext/B/t/optree_misc.t8
-rw-r--r--ext/B/t/optree_samples.t8
-rw-r--r--ext/B/t/optree_sort.t8
-rw-r--r--ext/B/t/optree_specials.t8
-rw-r--r--ext/B/t/optree_varinit.t8
-rw-r--r--ext/B/t/pragma.t9
-rw-r--r--ext/B/t/showlex.t13
-rw-r--r--ext/B/t/terse.t7
-rw-r--r--ext/B/t/xref.t7
18 files changed, 20 insertions, 132 deletions
diff --git a/ext/B/t/b.t b/ext/B/t/b.t
index 96d8ee698e..f0211bd13a 100644
--- a/ext/B/t/b.t
+++ b/ext/B/t/b.t
@@ -1,17 +1,7 @@
#!./perl
BEGIN {
- if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- if ($^O eq 'MacOS') {
- @INC = qw(: ::lib ::macos:lib);
- } else {
- @INC = '.';
- push @INC, '../lib';
- }
- } else {
- unshift @INC, 't';
- }
+ unshift @INC, 't';
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
diff --git a/ext/B/t/concise-xs.t b/ext/B/t/concise-xs.t
index b849af50ca..b50cbb230d 100644
--- a/ext/B/t/concise-xs.t
+++ b/ext/B/t/concise-xs.t
@@ -95,13 +95,7 @@ Looking at ../foo2, you'll see 34 occurrences of the following error:
=cut
BEGIN {
- if ($ENV{PERL_CORE}) {
- chdir('t') if -d 't';
- @INC = ('.', '../lib');
- } else {
- unshift @INC, 't';
- push @INC, "../../t";
- }
+ unshift @INC, 't';
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
diff --git a/ext/B/t/concise.t b/ext/B/t/concise.t
index 5cd554383d..3eb22ce8dd 100644
--- a/ext/B/t/concise.t
+++ b/ext/B/t/concise.t
@@ -1,13 +1,7 @@
#!./perl
BEGIN {
- if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- @INC = ('.', '../lib');
- } else {
- unshift @INC, 't';
- push @INC, "../../t";
- }
+ unshift @INC, 't';
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
diff --git a/ext/B/t/f_map.t b/ext/B/t/f_map.t
index 420e649069..11877efb5a 100644
--- a/ext/B/t/f_map.t
+++ b/ext/B/t/f_map.t
@@ -1,13 +1,7 @@
#!perl
BEGIN {
- if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- @INC = ('.', '../lib', '../ext/B/t');
- } else {
- unshift @INC, 't';
- push @INC, "../../t";
- }
+ unshift @INC, 't';
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
diff --git a/ext/B/t/f_sort.t b/ext/B/t/f_sort.t
index 4117298e54..6a36fcb49b 100644
--- a/ext/B/t/f_sort.t
+++ b/ext/B/t/f_sort.t
@@ -1,13 +1,7 @@
#!perl
BEGIN {
- if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- @INC = ('.', '../lib', '../ext/B/t');
- } else {
- unshift @INC, 't';
- push @INC, "../../t";
- }
+ unshift @INC, 't';
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
diff --git a/ext/B/t/o.t b/ext/B/t/o.t
index 2b84f39b29..f1c8ae3e83 100644
--- a/ext/B/t/o.t
+++ b/ext/B/t/o.t
@@ -1,13 +1,7 @@
#!./perl -w
BEGIN {
- if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- @INC = ('.', 'lib', '../lib');
- } else {
- unshift @INC, 't';
- push @INC, "../../t";
- }
+ unshift @INC, 't';
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
diff --git a/ext/B/t/optree_check.t b/ext/B/t/optree_check.t
index a099295ec0..1629677cec 100644
--- a/ext/B/t/optree_check.t
+++ b/ext/B/t/optree_check.t
@@ -1,13 +1,7 @@
#!perl
BEGIN {
- if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- @INC = ('.', '../lib', '../ext/B/t');
- } else {
- unshift @INC, 't';
- push @INC, "../../t";
- }
+ unshift @INC, 't';
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
diff --git a/ext/B/t/optree_concise.t b/ext/B/t/optree_concise.t
index 319144758f..00a78498ee 100644
--- a/ext/B/t/optree_concise.t
+++ b/ext/B/t/optree_concise.t
@@ -1,13 +1,7 @@
#!perl
BEGIN {
- if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- @INC = ('.', '../lib', '../ext/B/t');
- } else {
- unshift @INC, 't';
- push @INC, "../../t";
- }
+ unshift @INC, 't';
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
diff --git a/ext/B/t/optree_constants.t b/ext/B/t/optree_constants.t
index bf6384b3bd..47afea4999 100644
--- a/ext/B/t/optree_constants.t
+++ b/ext/B/t/optree_constants.t
@@ -1,13 +1,7 @@
#!perl
BEGIN {
- if ($ENV{PERL_CORE}) {
- chdir('t') if -d 't';
- @INC = ('.', '../lib', '../ext/B/t');
- } else {
- unshift @INC, 't';
- push @INC, "../../t";
- }
+ unshift @INC, 't';
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
diff --git a/ext/B/t/optree_misc.t b/ext/B/t/optree_misc.t
index bcb0f2ef31..7a8f25ac40 100644
--- a/ext/B/t/optree_misc.t
+++ b/ext/B/t/optree_misc.t
@@ -1,13 +1,7 @@
#!perl
BEGIN {
- if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- @INC = ('.', '../lib', '../ext/B/t');
- } else {
- unshift @INC, 't';
- push @INC, "../../t";
- }
+ unshift @INC, 't';
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
diff --git a/ext/B/t/optree_samples.t b/ext/B/t/optree_samples.t
index 5e9d1db371..065fcadc14 100644
--- a/ext/B/t/optree_samples.t
+++ b/ext/B/t/optree_samples.t
@@ -1,13 +1,7 @@
#!perl
BEGIN {
- if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- @INC = ('.', '../lib', '../ext/B/t');
- } else {
- unshift @INC, 't';
- push @INC, "../../t";
- }
+ unshift @INC, 't';
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
diff --git a/ext/B/t/optree_sort.t b/ext/B/t/optree_sort.t
index 0a5047e2fb..e4dd4160a6 100644
--- a/ext/B/t/optree_sort.t
+++ b/ext/B/t/optree_sort.t
@@ -1,13 +1,7 @@
#!perl
BEGIN {
- if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- @INC = ('.', '../lib', '../ext/B/t');
- } else {
- unshift @INC, 't';
- push @INC, "../../t";
- }
+ unshift @INC, 't';
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
diff --git a/ext/B/t/optree_specials.t b/ext/B/t/optree_specials.t
index c5aba7b827..1f813230af 100644
--- a/ext/B/t/optree_specials.t
+++ b/ext/B/t/optree_specials.t
@@ -8,13 +8,7 @@
# spaces.
BEGIN {
- if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- @INC = ('.', '../lib', '../ext/B/t');
- } else {
- unshift @INC, 't';
- push @INC, "../../t";
- }
+ unshift @INC, 't';
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
diff --git a/ext/B/t/optree_varinit.t b/ext/B/t/optree_varinit.t
index 5c8f619629..f748ab8ca0 100644
--- a/ext/B/t/optree_varinit.t
+++ b/ext/B/t/optree_varinit.t
@@ -1,13 +1,7 @@
#!perl
BEGIN {
- if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- @INC = ('.', '../lib', '../ext/B/t');
- } else {
- unshift @INC, 't';
- push @INC, "../../t";
- }
+ unshift @INC, 't';
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
diff --git a/ext/B/t/pragma.t b/ext/B/t/pragma.t
index 2278cc1782..2ed390daca 100644
--- a/ext/B/t/pragma.t
+++ b/ext/B/t/pragma.t
@@ -2,12 +2,9 @@
BEGIN { ## no critic strict
if ( $ENV{PERL_CORE} ) {
- chdir('t') if -d 't';
- @INC = qw(../lib . lib);
- }
- else {
- unshift @INC, '../../t/lib'; # FIXME when PERL_CORE works again
- # unshift @INC, 't';
+ unshift @INC, '../../t/lib';
+ } else {
+ unshift @INC, 't';
}
require Config;
if ( ( $Config::Config{'extensions'} !~ /\bB\b/ ) ) {
diff --git a/ext/B/t/showlex.t b/ext/B/t/showlex.t
index 3cb28da0b3..257b9c97b9 100644
--- a/ext/B/t/showlex.t
+++ b/ext/B/t/showlex.t
@@ -1,18 +1,7 @@
#!./perl
BEGIN {
- if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- if ($^O eq 'MacOS') {
- @INC = qw(: ::lib ::macos:lib);
- } else {
- @INC = '.';
- push @INC, '../lib';
- }
- } else {
- unshift @INC, 't';
- push @INC, "../../t";
- }
+ unshift @INC, 't';
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
diff --git a/ext/B/t/terse.t b/ext/B/t/terse.t
index 8d86a49bfe..7c1d39686e 100644
--- a/ext/B/t/terse.t
+++ b/ext/B/t/terse.t
@@ -1,12 +1,7 @@
#!./perl
BEGIN {
- if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- @INC = ('.', '../lib');
- } else {
- unshift @INC, 't';
- }
+ unshift @INC, 't';
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";
diff --git a/ext/B/t/xref.t b/ext/B/t/xref.t
index 450582bb49..5d9cb38854 100644
--- a/ext/B/t/xref.t
+++ b/ext/B/t/xref.t
@@ -1,12 +1,7 @@
#!./perl
BEGIN {
- if ($ENV{PERL_CORE}){
- chdir('t') if -d 't';
- @INC = ('.', '../lib');
- } else {
- unshift @INC, 't';
- }
+ unshift @INC, 't';
require Config;
if (($Config::Config{'extensions'} !~ /\bB\b/) ){
print "1..0 # Skip -- Perl configured without B module\n";