Subject: | t/00-base.t fails on Windows with nmake due to hard-coded file name |
See
"C:\opt\perl-5.20.1\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib\lib', 'blib\arch')" t\00-base.t t\01-new.t t\02-use.t t\03-use-error.t
t\00-base.t ....... 1/14
# Failed test at t\00-base.t line 26.
# ''K' cannot access the value of 'ro' on objects of class 'K' at t\00-base.t line 24.
# '
# doesn't match '(?^:'K' cannot access the value of 'ro' on objects of class 'K' at t/00-base.t line )'
# Failed test at t\00-base.t line 33.
# ''K' cannot alter the value of 'wo' on objects of class 'K' at t\00-base.t line 30.
# '
# doesn't match '(?^:'K' cannot alter the value of 'wo' on objects of class 'K' at t/00-base.t line )'
# Looks like you failed 2 tests of 14.
t\00-base.t ....... Dubious, test returned 2 (wstat 512, 0x200)
Subject: | nanis-fix-hard-coded-paths-in-tests.patch |
From 537f0017b92196fc527a9b73cad48bc281b3f3ce Mon Sep 17 00:00:00 2001
From: "A. Sinan Unur" <nanis@cpan.org>
Date: Tue, 9 Dec 2014 14:00:48 -0500
Subject: [PATCH 1/2] Fix "Cannot determine perl version info from
lib/Class/Accessor/Lite.pm"
Based on the LICENSE section in the POD, I deduced that this module
is meant to be compatible with perl 5.008006, and later.
---
lib/Class/Accessor/Lite.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/Class/Accessor/Lite.pm b/lib/Class/Accessor/Lite.pm
index 145df42..7874317 100644
--- a/lib/Class/Accessor/Lite.pm
+++ b/lib/Class/Accessor/Lite.pm
@@ -1,5 +1,6 @@
package Class::Accessor::Lite;
+use 5.008006;
use strict;
our $VERSION = '0.06';
--
2.1.1
From f7cc43504cb4ce185ea7a7dcdc23b54f1661b23c Mon Sep 17 00:00:00 2001
From: "A. Sinan Unur" <nanis@cpan.org>
Date: Tue, 9 Dec 2014 14:02:55 -0500
Subject: [PATCH 2/2] Fix spurious test failure due to hard-coded file name.
On Windows with nmake, the script is invoked with Windows style
directory separators in the filename, and the test fails due
the hard-coded file name in regex pattern. Fix by matching against
\Q$0\E instead.
---
t/00-base.t | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/00-base.t b/t/00-base.t
index 2336f0c..ada85dc 100644
--- a/t/00-base.t
+++ b/t/00-base.t
@@ -23,12 +23,12 @@ is($k->bar, 2);
is($k->ro, 3);
eval { $k->ro(99) };
my $e = $@;
-like $e, qr{'K' cannot access the value of 'ro' on objects of class 'K' at t/00-base.t line };
+like $e, qr{'K' cannot access the value of 'ro' on objects of class 'K' at \Q$0\E line };
$k->wo(801);
is $k->{wo}, '801';
is_deeply($k->wo(2, 3), [ 2, 3 ]);
eval { $k->wo() };
$e = $@;
ok $e;
-like $e, qr{'K' cannot alter the value of 'wo' on objects of class 'K' at t/00-base.t line };
+like $e, qr{'K' cannot alter the value of 'wo' on objects of class 'K' at \Q$0\E line };
--
2.1.1