Subject: | [patch] Tests fail when no '.' in @INC (Can't locate t/classes.pl in @INC ) |
PERL_USE_UNSAFE_INC=0 make test
cp lib/Class/Container.pm blib/lib/Class/Container.pm
PERL_DL_NONLAZY=1 "/home/kent/perl5/perlbrew/perls/5.26.0-RC1-nossp-sip13-nopmc-nodot/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01-basic.t ...... Can't locate t/classes.pl in @INC (@INC contains: /tmp/Class-Container/blib/lib /tmp/Class-Container/blib/arch /home/kent/perl5/perlbrew/perls/5.26.0-RC1-nossp-sip13-nopmc-nodot/lib/site_perl/5.26.0/x86_64-linux /home/kent/perl5/perlbrew/perls/5.26.0-RC1-nossp-sip13-nopmc-nodot/lib/site_perl/5.26.0 /home/kent/perl5/perlbrew/perls/5.26.0-RC1-nossp-sip13-nopmc-nodot/lib/5.26.0/x86_64-linux /home/kent/perl5/perlbrew/perls/5.26.0-RC1-nossp-sip13-nopmc-nodot/lib/5.26.0) at t/01-basic.t line 15.
t/01-basic.t ...... Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
t/02-decorator.t .. Can't locate t/classes.pl in @INC (@INC contains: /tmp/Class-Container/blib/lib /tmp/Class-Container/blib/arch /home/kent/perl5/perlbrew/perls/5.26.0-RC1-nossp-sip13-nopmc-nodot/lib/site_perl/5.26.0/x86_64-linux /home/kent/perl5/perlbrew/perls/5.26.0-RC1-nossp-sip13-nopmc-nodot/lib/site_perl/5.26.0 /home/kent/perl5/perlbrew/perls/5.26.0-RC1-nossp-sip13-nopmc-nodot/lib/5.26.0/x86_64-linux /home/kent/perl5/perlbrew/perls/5.26.0-RC1-nossp-sip13-nopmc-nodot/lib/5.26.0) at t/02-decorator.t line 9.
t/02-decorator.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 24/24 subtests
Test Summary Report
-------------------
t/01-basic.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/02-decorator.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: Bad plan. You planned 24 tests but ran 0.
Files=2, Tests=0, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.05 cusr 0.01 csys = 0.09 CPU)
Result: FAIL
--
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
Subject: | 0001-Fix-tests-failing-on-Perl-5.26-w-o-.-in-INC.patch |
From ad573ffead49441950856254999722e1189616b0 Mon Sep 17 00:00:00 2001
From: Kent Fredric <kentnl@gentoo.org>
Date: Wed, 18 Oct 2017 09:37:56 +1300
Subject: Fix tests failing on Perl 5.26 w/o '.' in @INC
---
t/01-basic.t | 2 +-
t/02-decorator.t | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/01-basic.t b/t/01-basic.t
index 931073b..a458303 100644
--- a/t/01-basic.t
+++ b/t/01-basic.t
@@ -12,7 +12,7 @@ use Test;
use Class::Container;
use Params::Validate qw(:types);
use File::Spec;
-require File::Spec->catfile('t', 'classes.pl');
+require File::Spec->rel2abs(File::Spec->catfile('t', 'classes.pl'));
my $HAVE_WEAKEN = 0 + exists $INC{'Scalar/Util.pm'};
diff --git a/t/02-decorator.t b/t/02-decorator.t
index ea75057..0e2ca83 100644
--- a/t/02-decorator.t
+++ b/t/02-decorator.t
@@ -6,7 +6,7 @@ BEGIN { plan tests => 24 }
use Class::Container;
use Params::Validate qw(:types);
use File::Spec;
-require File::Spec->catfile('t', 'classes.pl');
+require File::Spec->rel2abs(File::Spec->catfile('t', 'classes.pl'));
--
2.14.2