Skip Menu |

This queue is for tickets about the Module-ScanDeps CPAN distribution.

Report information
The Basics
Id: 31189
Status: resolved
Priority: 0/
Queue: Module-ScanDeps

People
Owner: Nobody in particular
Requestors: METAL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] t/10-case-insensitive-keys.t fails on Win32
On a Windows XP SP2 machine running a local build of 5.8.8 with some ActivePerl patches, "nmake test" for Module::ScanDeps 0.80 failed in t/10-case-insensitive-keys.t: Show quoted text
> t/10-case-insensitive-keys........................You tried to run a
test without a plan at t/10-case-insensitive-keys.t line 20. Show quoted text
> BEGIN failed--compilation aborted at t/10-case-insensitive-keys.t line 20. > t/10-case-insensitive-keys........................ Dubious, test
returned 9 (wstat 2304, 0x900) Show quoted text
> No subtests run
Investigation showed that use_ok was called inside a BEGIN block, but Test::More::plan was not; thus the test plan was not initialized. Adding a BEGIN block around the call to Test::More::plan resolved that error, but provoked a different one: Show quoted text
> t/10-case-insensitive-keys........................1/42 # Looks like
you planned 42 tests but ran 1 extra. Show quoted text
> t/10-case-insensitive-keys........................ Dubious, test
returned 255 (wstat 65280, 0xff00) Show quoted text
> All 42 subtests passed
Changing the test plan from 42 to 43 subtests resolved this error, and "nmake test" ran successfully. Patch attached.
Subject: Module_ScanDeps.diff
--- t/10-case-insensitive-keys.t.bak 2007-12-04 04:54:57.463962500 -0500 +++ t/10-case-insensitive-keys.t 2007-12-04 04:55:24.648395100 -0500 @@ -5,10 +5,12 @@ use File::Spec; use Test::More; +BEGIN { if(!File::Spec->case_tolerant()) { plan skip_all => 'Test irrelevant on case intolerant systems'; } else { - plan tests => 42; + plan tests => 43; + } } use lib qw(t t/data/case-insensitive-keys);
Thanks for the bug report. I committed your patch to the trunk of Module::ScanDeps. I'll dispatch a mail to the PAR mailing list asking for somebody on Win32 to test it (the trunk) since I don't have any case-insensitive file systems available. Of course, you're free to test it as well. Once I've seen a success report on Win32, I'll make a new M::SD release. Best regards, Steffen