Subject: | Test t/Ref.t fails on Windows install |
Date: | Tue, 4 Oct 2016 19:44:43 +0000 |
To: | "bug-MIME-tools [...] rt.cpan.org" <bug-MIME-tools [...] rt.cpan.org> |
From: | Mark Solinski <mark.solinski [...] gpsinsight.com> |
Hello,
There is a hack (labeled as such in t/Ref.h) which looks like this:
### HACK HACK HACK: MailTools behaviour has changed!!!
if ($msgpath eq 'testmsgs/hdr-fakeout.msg' && $::Mail::Header::VERSION > 2.14) {
$refpath = 'testmsgs/hdr-fakeout-newmailtools-ref';
}
The problem is the test "$msgpath eq 'testmsgs/hdr-fakeout.msg'" which when executed via the Windows (command) shell, will always fail. This is because, on Windows, the $msgpath variable will look something like "testmsgs\\hdr-fakeout.msg". On the Windows platform, the standard path separator is '\' and not '/'. Since Windows can use either separators, a fix will require, either that $msgpath only uses the '/' separator or the comparison needs to be relaxed to handle both separators.
When I insured that $msgpath only used the '/' separator (and $::Mail::Header::VERSION was equal to 2.18), $refpath was set and all the tests passed.
Mark Solinski | Back End Development Manager
GPS Insight
7201 E. Henkel Way, Suite 400 | Scottsdale, AZ 85255
866.477.4321 Office x8596
480.513.1694 Fax
847.338.2006 Mobile
gpsinsight.com
[../Desktop/gpsi_logo_flat.jpg]