Fix Test::HasVersion for 1.5 #328

Closed
schwern opened this Issue Aug 2, 2012 · 1 comment

Projects

None yet

1 participant

@schwern
Test-More member

0.012 is broken with 1.5. Has no serious dependents, very low priority.

# Testing Test::HasVersion 0.012, Perl 5.014001, /Users/schwern/perl5/perlbrew/perls/perl-5.14.1/bin/perl
t/01_use.t ........... ok
t/02_basic.t ......... ok
t/03_all_pm_files.t .. ok

#   Failed test 'good plan'
#   at t/04_all.ok.t line 19.
#                   'TAP version 13
# '
#     doesn't match '(?^:^1\.\.3)'

#   Failed test 'A.pm has version'
#   at t/04_all.ok.t line 25.
#                   '1..3
# '
#     doesn't match '(?^:^ok \d+ - A.pm)'

#   Failed test 'lib/B.pm has version'
#   at t/04_all.ok.t line 25.
#                   'ok 1 - A.pm has version
# '
#     doesn't match '(?^:^ok \d+ - lib/B.pm)'

#   Failed test 'lib/B/C.pm has no version'
#   at t/04_all.ok.t line 25.
#                   'ok 2 - lib/B.pm has version
# '
#     doesn't match '(?^:^not ok \d+ - lib/B/C.pm)'
Use of uninitialized value $ans in regexp compilation at t/04_all.ok.t line 25.
Use of uninitialized value $f in regexp compilation at t/04_all.ok.t line 25.
Use of uninitialized value $ans in string eq at t/04_all.ok.t line 25.
Use of uninitialized value $f in concatenation (.) or string at t/04_all.ok.t line 25.

#   Failed test ' has no version'
#   at t/04_all.ok.t line 25.
#                   'not ok 3 - lib/B/C.pm has version
# '
#     doesn't match '(?^:^ \d+ - )'
# 7 tests planned, but 8 ran.
# 5 tests of 8 failed.
t/04_all.ok.t ........ 
Dubious, test returned 5 (wstat 1280, 0x500)
Failed 4/7 subtests 
t/09_self_test.t ..... ok
t/97_has_version.t ... ok
t/98_pod-coverage.t .. ok
t/99_pod.t ........... ok

Test Summary Report
-------------------
t/04_all.ok.t      (Wstat: 1280 Tests: 8 Failed: 5)
  Failed tests:  4-8
  Non-zero exit status: 5
  Parse errors: Bad plan.  You planned 7 tests but ran 8.
Files=8, Tests=28,  2 wallclock secs ( 0.06 usr  0.02 sys +  1.38 cusr  0.10 csys =  1.56 CPU)
Result: FAIL
Failed 1/8 test programs. 5/28 subtests failed.
@schwern
Test-More member

Fix sent upstream. Just a test issue. https://rt.cpan.org/Ticket/Display.html?id=78758

@schwern schwern added a commit that referenced this issue Aug 3, 2012
@schwern schwern Emulate an accidental behavior of Test::Builder::Tester.
Previously, TBT would not completely reset the test state so the
plan would still be set.  Some tests accidentally relied on this,
anything that would set the plan if it hasn't already been set like
Test::HasVersion or Test::DistManifest.

This change sets a plan in the test test if there was one before
to emulate the behavior.

For #327 and #328
00d4609
@schwernbot schwernbot referenced this issue in Test-More/TB2 Mar 16, 2014
Open

Fix Test::HasVersion for 1.5 #63

@schwern schwern closed this Mar 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment