You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-perl/Date-Manip/files/Date-Manip-6.56-dirname-ver...

45 lines
1.2 KiB

From bddc157c9624a8a2a2c83efb6fe846292c9f4ca1 Mon Sep 17 00:00:00 2001
From: Kent Fredric <kentfredric@gmail.com>
Date: Fri, 11 Nov 2016 10:48:50 +1300
Subject: [PATCH] Don't inherit test version from directory name
As per RT#118705, this regex relies on extracting the version
from the directory name for comparison, which on Gentoo, gets
the *parent* directory, and picks up the Gentoo normalized version
instead of upstreams version in a child path.
Bug: https://rt.cpan.org/Ticket/Display.html?id=118705
---
t/obj.t | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/t/obj.t b/t/obj.t
index 8a26395..1691f46 100755
--- a/t/obj.t
+++ b/t/obj.t
@@ -5,19 +5,9 @@ $t = new Test::Inter 'object';
$testdir = '';
$testdir = $t->testdir();
-use Cwd;
-my $dir = getcwd;
-$dir =~ /Date-Manip-([0-9.]+)/;
-my $vers = $1;
-
-# Travis-CI renames the directory to just Date-Manip (no version) so this
-# test cannot be done.
-if (! defined $vers) {
- $vers = DateManipVersion();
-}
-
-$ENV{'TZ'} = 'America/Chicago';
use Date::Manip;
+my $vers = DateManipVersion();
+$ENV{'TZ'} = 'America/Chicago';
if (DateManipVersion() >= 6.00) {
$t->feature("DM6",1);
}
--
2.10.2