Subject: | Hard coded directory separators in main module cause tests to fail |
Date: | Sat, 15 Oct 2016 19:06:04 -0400 |
To: | bug-Class-Accessor-Grouped [...] rt.cpan.org |
From: | "A. Sinan Unur" <nanis [...] cpan.org> |
See, for example:
http://www.cpantesters.org/cpan/report/64e8755c-6ce9-1014-a6aa-46c4498f6302
t\accessors_xs.t ............. ok
# Failed test '3 warnings total'
# at t\accessors_xs_cachedwarn.t line 59.
# got: '0'
# expected: '3'
# Failed test '3 warnings produced as expected on cached invocation
during testing'
# at t\accessors_xs_cachedwarn.t line 65.
# got: '0'
# expected: '3'
#
# $0 is: "t\\accessors_xs_cachedwarn.t"
# Looks like you failed 2 tests of 9.
The tests fail because the on Line 71 hard codes the directory separator:
https://metacpan.org/source/RIBASUSHI/Class-Accessor-Grouped-0.10012/lib/Class/Accessor/Grouped.pm#L71
$0 =~ m{ ^ (?: \. \/ )? x?t / .+ \.t $}x
The test is checking if the executable is in a test directory and has
a .t extension.
This fails to match a test file when the module is being built with a
perl that was built with Visual Studio because in that case EUMM uses
`\` as the directory separator.
-- Sinan