Subject: | Getopt-Complete-0.25 test failure on Strawberry Perl on Windows |
Date: | Fri, 1 Jul 2011 14:50:13 +0300 |
To: | Scott Smith <sakoht [...] cpan.org>, bug-Getopt-Complete [...] rt.cpan.org |
From: | Gabor Szabo <szabgab [...] gmail.com> |
hi Scott,
while running CPAN smoke-test on Strawberry Perl 5.12.3 I encountered
test failures in Getopt-Complete-0.25.
I have not looked deep but I noticed some issues in t\03-demoapp-completion.t
1) the separator in $ENV{PATH} is not : on Windows. Better load the
Config module
and use the $Config{path_sep} variable.
2) When running external perl scripts it is *always* better to run $^X
path/to/script to make sure
you are running it with the same perl as you used for running the
test. Otherwise there might
be another perl in he PATH earlier. (That's true for Linux as well).
In this case running perl scripts with `script_name` is not
supported in Windows at all.
I think if you wrote something like this:
qx{$^X path_to_script param param}
that might get your tests pass on Windows as well.
Included the test output:
C:\strawberry\cpan\build\Getopt-Complete-0.25-raio8g>perl Build test
t\00-load.t ................ 1/1 # Testing Getopt::Complete 0.25, Perl
5.012003, C:\STRAWB~1\perl\bin\perl.exe
t\00-load.t ................ ok
t\01-try-many.t ............ skipped: not functioning yet
t\02-boilerplate.t ......... ok
t\03-demoapp-completion.t .. 1/12 Use of uninitialized value in split
at t\03-demoapp-completion.t line 30.
# Failed test 'results for valid sub-command'
# at t\03-demoapp-completion.t line 14.
Use of uninitialized value in split at t\03-demoapp-completion.t line 30.
# Failed test 'results for valid partial sub-command'
# at t\03-demoapp-completion.t line 15.
Use of uninitialized value in split at t\03-demoapp-completion.t line 30.
Use of uninitialized value in split at t\03-demoapp-completion.t line 30.
# Failed test 'results for valid option-space-argument'
# at t\03-demoapp-completion.t line 17.
Use of uninitialized value in split at t\03-demoapp-completion.t line 30.
# Failed test 'results for valid option-equals-argument'
# at t\03-demoapp-completion.t line 18.
Use of uninitialized value in split at t\03-demoapp-completion.t line 30.
Use of uninitialized value in split at t\03-demoapp-completion.t line 30.
Use of uninitialized value in split at t\03-demoapp-completion.t line 30.
Use of uninitialized value in split at t\03-demoapp-completion.t line 30.
Use of uninitialized value in split at t\03-demoapp-completion.t line 30.
# Failed test 'file completion for unknown option'
# at t\03-demoapp-completion.t line 23.
Use of uninitialized value in split at t\03-demoapp-completion.t line 30.
# Failed test 'file completion for bare args'
# at t\03-demoapp-completion.t line 24.
# Looks like you failed 6 tests of 12.
t\03-demoapp-completion.t .. Dubious, test returned 6 (wstat 1536, 0x600)
Failed 6/12 subtests
t\04-exercise.t ............ ok
t\05-bad-arg-name.t ........ ok
Test Summary Report
-------------------
t\03-demoapp-completion.t (Wstat: 1536 Tests: 12 Failed: 6)
Failed tests: 2-3, 5-6, 11-12
Non-zero exit status: 6
Files=6, Tests=18, 1 wallclock secs ( 0.03 usr + 0.10 sys = 0.13 CPU)
Result: FAIL
Failed 1/6 test programs. 6/18 subtests failed.
C:\strawberry\cpan\build\Getopt-Complete-0.25-raio8g>
--
Gabor Szabo
http://szabgab.com/