cpan-testers / CPAN-Reporter

(Perl) Adds CPAN Testers reporting to CPAN.pm
http://search.cpan.org/dist/CPAN-Reporter/
20 stars 18 forks source link

t/70_darwin_move_config.t fails on require IPC::Cmd on strawberry perl 5.14.2 preview win xp home sp3 [rt.cpan.org #74368] #66

Open xdg opened 8 years ago

xdg commented 8 years ago

https://rt.cpan.org/Ticket/Display.html?id=74368

This might be a bug in the POSIX (or maybe AutoLoader or...) provided by
the preview release of Strawberry Perl 5.14.2,
but a minor patch to t/70_darwin_move_config.t
(requiring POSIX in the test before changing $^O) 
enables the test to pass for me on Win XP Home SP3.

C:\strawberry\cpan\build\CPAN-Reporter-1.2003-jFTJ0W>perl -Ilib
t\70_darwin_move
_config.t
1..9
not ok 1 - require CPAN::Reporter::Config;
#   Failed test 'require CPAN::Reporter::Config;'
#   at t\70_darwin_move_config.t line 60.
#     Tried to require 'CPAN::Reporter::Config'.
#     Error:  Bareword "WNOHANG" not allowed while "strict subs" in use
at C:/st
rawberry/perl/lib/IPC/Cmd.pm line 417.
# BEGIN not safe after errors--compilation aborted at
C:/strawberry/perl/lib/IPC
/Cmd.pm line 1285.
# Compilation failed in require at lib/CPAN/Reporter/Config.pm line 10.
# BEGIN failed--compilation aborted at lib/CPAN/Reporter/Config.pm line 10.
# Compilation failed in require at (eval 22) line 2.
ok 2 - non-darwin logic: old config dir still in place
ok 3 - non-darwin logic: new config dir not created
not ok 4 - require CPAN::Reporter::Config;
#   Failed test 'require CPAN::Reporter::Config;'
#   at t\70_darwin_move_config.t line 76.
#     Tried to require 'CPAN::Reporter::Config'.
#     Error:  Attempt to reload IPC/Cmd.pm aborted.
# Compilation failed in require at lib/CPAN/Reporter/Config.pm line 10.
# BEGIN failed--compilation aborted at lib/CPAN/Reporter/Config.pm line 10.
# Compilation failed in require at (eval 24) line 2.
not ok 5 - CPAN::Reporter::Config reloaded
#   Failed test 'CPAN::Reporter::Config reloaded'
#   at t\70_darwin_move_config.t line 78.
not ok 6 - darwin logic: old config-dir removed
#   Failed test 'darwin logic: old config-dir removed'
#   at t\70_darwin_move_config.t line 81.
not ok 7 - darwin logic: new config-dir created
#   Failed test 'darwin logic: new config-dir created'
#   at t\70_darwin_move_config.t line 84.
No such file or directory at t\70_darwin_move_config.t line 87.
# Looks like you planned 9 tests but ran 7.
# Looks like you failed 5 tests of 7 run.
# Looks like your test exited with 2 just after 7.

Simpler test case:

C:\strawberry\cpan\build\CPAN-Reporter-1.2003-jFTJ0W>perl -Ilib -e
"local $^O=q[
unknown]; print eval q[require CPAN::Reporter::Config] || $@"
Bareword "WNOHANG" not allowed while "strict subs" in use at
C:/strawberry/perl/
lib/IPC/Cmd.pm line 417.
BEGIN not safe after errors--compilation aborted at
C:/strawberry/perl/lib/IPC/C
md.pm line 1285.
Compilation failed in require at lib/CPAN/Reporter/Config.pm line 10.
BEGIN failed--compilation aborted at lib/CPAN/Reporter/Config.pm line 10.
Compilation failed in require at (eval 1) line 2.