Skip Menu |

This queue is for tickets about the Class-Accessor-Grouped CPAN distribution.

Report information
The Basics
Id: 118400
Status: new
Priority: 0/
Queue: Class-Accessor-Grouped

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

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



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
CC: "A. Sinan Unur" <nanis [...] cpan.org>
Subject: Re: [rt.cpan.org #118400] AutoReply: Hard coded directory separators in main module cause tests to fail
Date: Sat, 15 Oct 2016 19:27:32 -0400
To: bug-Class-Accessor-Grouped [...] rt.cpan.org
From: "A. Sinan Unur" <nanis [...] cpan.org>
The following change: diff --git a/lib/Class/Accessor/Grouped.pm b/lib/Class/Accessor/Grouped.pm index e6a1240..e7f1dfc 100644 --- a/lib/Class/Accessor/Grouped.pm +++ b/lib/Class/Accessor/Grouped.pm @@ -68,7 +68,7 @@ BEGIN { constant->import( TRACK_UNDEFER_FAIL => ( $INC{'Test/Builder.pm'} || $INC{'Test/Builder2.pm'} and - $0 =~ m{ ^ (?: \. \/ )? x?t / .+ \.t $}x + $0 =~ m{ ^ (?: \. [/\\] )? x?t [/\\] .+ \.t $}x ) ? 1 : 0 ); allows all tests to pass. t\manifest.t fails because there is no MANIFEST file, but I don't know if that matters. -- Sinan