Skip Menu |

This queue is for tickets about the Perl-MinimumVersion CPAN distribution.

Report information
The Basics
Id: 95528
Status: open
Priority: 0/
Queue: Perl-MinimumVersion

People
Owner: Nobody in particular
Requestors: paul [...] city-fan.org
Cc: ether [...] cpan.org
AdminCc:

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



Subject: t/25_scheduled_blocks.t failing on old perls
Here we have another one like RT#95023: $ make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/01_compile.t ........... ok t/02_main.t .............. ok t/03_open_3arg.t ......... ok t/04_substr.t ............ ok t/05_foreach.t ........... ok t/06_weaken.t ............ ok t/07_splice.t ............ ok t/08_mkdir.t ............. ok t/09_pkg_name_version.t .. ok t/10_yada_yada_yada.t .... ok t/11_feature_bundle.t .... ok t/12_double_colon.t ...... ok t/13_perl_510.t .......... ok t/14_regex.t ............. ok t/15_each.t .............. ok t/16_binmode.t ........... ok t/17_when.t .............. ok t/18_exists_subr.t ....... ok t/19_opentemp.t .......... ok t/20_sort_subref.t ....... ok t/21_openscalar.t ........ ok t/22_while_readdir.t ..... ok t/23_internals.t ......... ok t/24_state.t ............. ok # Failed test ' UNITCHECK { } ' # at t/25_scheduled_blocks.t line 23. # got: '5.01' # expected: '5.010' # Looks like you failed 1 test of 4. t/25_scheduled_blocks.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/4 subtests t/26_stacked_labels.t .... ok Test Summary Report ------------------- t/25_scheduled_blocks.t (Wstat: 256 Tests: 4 Failed: 1) Failed test: 4 Non-zero exit status: 1 Files=26, Tests=342, 5 wallclock secs ( 0.13 usr 0.02 sys + 3.95 cusr 0.38 csys = 4.48 CPU) Result: FAIL Failed 1/26 test programs. 1/342 subtests failed. Attached patch changes the test to do a numeric comparison rather than a string one, which works on both old and new perls.
Subject: Perl-MinimumVersion-1.36-versions.patch
--- t/25_scheduled_blocks.t +++ t/25_scheduled_blocks.t @@ -19,6 +19,6 @@ foreach my $example (sort keys %examples) { my $p = Perl::MinimumVersion->new(\$example); my $v = $p->minimum_version; - is( $v, $examples{$example}, $example ) + cmp_ok( $v, '==', $examples{$example}, $example ) or do { diag "\$\@: $@" if $@ }; }
Older Test::More (before 0.95_01) handled overloaded objects differently when comparing in is(). This especially has impact when comparing a version.pm object to an expected numerical version. So, you may want to explicitly compare $version->version rather than letting Test::More try to figure out what to do -- or simply require Test::More 0.96.