summaryrefslogtreecommitdiff
path: root/t/lib
diff options
context:
space:
mode:
authorJames E Keenan <jkeenan@cpan.org>2020-02-03 16:33:19 -0500
committerJames E Keenan <jkeenan@cpan.org>2020-02-04 08:04:02 -0500
commit915b794bfdc480ffedc696439aa063ae4191d5e3 (patch)
tree5f5517abdcf6fd6126d37a58cbadbaf9961dbe49 /t/lib
parent070720ff0f9b7ca6e49d9f9d2780d90b05aa31c4 (diff)
downloadperl-915b794bfdc480ffedc696439aa063ae4191d5e3.tar.gz
Prohibit usage of Test::Simple under 't/'
One of the objectives of t/porting/bootstrap.t has been to prohibit use of testing modules which need to be loaded via 'use MODULE' in test files found in subdirectories under 't/'. In those subdirectories, we do not presume that module loading via 'use MODULE' has been demonstrated to work. However, the unit test in bootstrap.t was written solely to spot instances of 'use Test::More'. It did not consider the possibility that a test file under 't/' might 'use Test::Simple'. There was one such test file which use-d Test::Simple: t/lib/overload_nomethod.t. This patch rewrites that file to use 't/test.pl' (as other t/lib/*.t files customarily do) and adapts t/porting/bootstrap.t to rule out 'use Test::Simple' as well as 'use Test::More' from '*.t' files underneath 't/'. For: https://github.com/Perl/perl5/issues/13231
Diffstat (limited to 't/lib')
-rw-r--r--t/lib/overload_nomethod.t10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/lib/overload_nomethod.t b/t/lib/overload_nomethod.t
index edff1639a1..d2839f80bf 100644
--- a/t/lib/overload_nomethod.t
+++ b/t/lib/overload_nomethod.t
@@ -1,6 +1,14 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ require './test.pl';
+}
+
+plan( tests => 3);
use warnings;
use strict;
-use Test::Simple tests => 3;
package Foo;
use overload