summaryrefslogtreecommitdiff
path: root/t/mro
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-11-02 11:28:54 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2014-11-02 14:00:15 -0500
commit0b1b7115083e7383e68c937e19f75df5d0fca8bf (patch)
tree116b4fcbd6097bc7d48adf08fc4ebe343db9c2b1 /t/mro
parentbfcaa0fd289158eede73680d514a03e9461efe88 (diff)
downloadperl-0b1b7115083e7383e68c937e19f75df5d0fca8bf.tar.gz
In tests, 'use strict' etc after the @INC manipulation.
Diffstat (limited to 't/mro')
-rw-r--r--t/mro/basic.t7
-rw-r--r--t/mro/inconsistent_c3.t5
-rw-r--r--t/mro/inconsistent_c3_utf8.t5
-rw-r--r--t/mro/method_caching.t12
-rw-r--r--t/mro/method_caching_utf8.t14
-rw-r--r--t/mro/recursion_c3.t5
-rw-r--r--t/mro/recursion_dfs.t5
7 files changed, 29 insertions, 24 deletions
diff --git a/t/mro/basic.t b/t/mro/basic.t
index b2578442ee..3b7f9e886e 100644
--- a/t/mro/basic.t
+++ b/t/mro/basic.t
@@ -1,13 +1,14 @@
#!./perl
-use strict;
-use warnings;
-
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
require q(./test.pl);
}
+
+use strict;
+use warnings;
+
plan(tests => 61);
require mro;
diff --git a/t/mro/inconsistent_c3.t b/t/mro/inconsistent_c3.t
index ae01e9fdf2..b0052261dd 100644
--- a/t/mro/inconsistent_c3.t
+++ b/t/mro/inconsistent_c3.t
@@ -1,7 +1,5 @@
#!./perl
-use strict;
-use warnings;
BEGIN {
unless (-d 'blib') {
chdir 't' if -d 't';
@@ -9,6 +7,9 @@ BEGIN {
}
}
+use strict;
+use warnings;
+
require q(./test.pl); plan(tests => 1);
require mro;
diff --git a/t/mro/inconsistent_c3_utf8.t b/t/mro/inconsistent_c3_utf8.t
index a8ba95810f..b7baa3ec5d 100644
--- a/t/mro/inconsistent_c3_utf8.t
+++ b/t/mro/inconsistent_c3_utf8.t
@@ -1,7 +1,5 @@
#!./perl
-use strict;
-use warnings;
BEGIN {
unless (-d 'blib') {
chdir 't' if -d 't';
@@ -9,6 +7,9 @@ BEGIN {
}
}
+use strict;
+use warnings;
+
use utf8;
use open qw( :utf8 :std );
diff --git a/t/mro/method_caching.t b/t/mro/method_caching.t
index 3f21b1b6b3..ab312a86bb 100644
--- a/t/mro/method_caching.t
+++ b/t/mro/method_caching.t
@@ -1,11 +1,5 @@
#!./perl
-use strict;
-no strict 'refs'; # we do a lot of this
-use warnings;
-no warnings 'redefine'; # we do a lot of this
-no warnings 'prototype'; # we do a lot of this
-
BEGIN {
unless (-d 'blib') {
chdir 't' if -d 't';
@@ -14,6 +8,12 @@ BEGIN {
require './test.pl';
}
+use strict;
+no strict 'refs'; # we do a lot of this
+use warnings;
+no warnings 'redefine'; # we do a lot of this
+no warnings 'prototype'; # we do a lot of this
+
{
package MCTest::Base;
sub foo { return $_[1]+1 };
diff --git a/t/mro/method_caching_utf8.t b/t/mro/method_caching_utf8.t
index b0a451dce2..ee31869dd3 100644
--- a/t/mro/method_caching_utf8.t
+++ b/t/mro/method_caching_utf8.t
@@ -1,12 +1,5 @@
#!./perl
-use utf8;
-use open qw( :utf8 :std );
-use strict;
-use warnings;
-no warnings 'redefine'; # we do a lot of this
-no warnings 'prototype'; # we do a lot of this
-
BEGIN {
unless (-d 'blib') {
chdir 't' if -d 't';
@@ -14,6 +7,13 @@ BEGIN {
}
}
+use utf8;
+use open qw( :utf8 :std );
+use strict;
+use warnings;
+no warnings 'redefine'; # we do a lot of this
+no warnings 'prototype'; # we do a lot of this
+
require './test.pl';
{
diff --git a/t/mro/recursion_c3.t b/t/mro/recursion_c3.t
index cd1db3355a..6ebd7fb2a1 100644
--- a/t/mro/recursion_c3.t
+++ b/t/mro/recursion_c3.t
@@ -1,7 +1,5 @@
#!./perl
-use strict;
-use warnings;
BEGIN {
unless (-d 'blib') {
chdir 't' if -d 't';
@@ -11,6 +9,9 @@ BEGIN {
require './test.pl';
+use strict;
+use warnings;
+
plan(skip_all => "Your system has no SIGALRM") if !exists $SIG{ALRM};
plan(tests => 8);
diff --git a/t/mro/recursion_dfs.t b/t/mro/recursion_dfs.t
index ddb4d31a08..00efe6d734 100644
--- a/t/mro/recursion_dfs.t
+++ b/t/mro/recursion_dfs.t
@@ -1,7 +1,5 @@
#!./perl
-use strict;
-use warnings;
BEGIN {
unless (-d 'blib') {
chdir 't' if -d 't';
@@ -9,6 +7,9 @@ BEGIN {
}
}
+use strict;
+use warnings;
+
require './test.pl';
plan(skip_all => "Your system has no SIGALRM") if !exists $SIG{ALRM};