Test-More / Test2-Harness

Alternative to Test::Harness
Other
23 stars 26 forks source link

t/integration/coverage.t fails with Test2::Plugin::Cover 0.000019 #220

Closed ppisar closed 3 years ago

ppisar commented 3 years ago

Since Test2-Harness-1.000048, t/integration/coverage.t does not pass with Test2::Plugin::Cover 0.000019:

$ perl -Iblib/{lib,arch} t/integration/coverage.t
# Seeded srand with seed '20210426' from local date.
not ok 1 - yath test -It/integration/coverage/lib t/integration/coverage --ext=tx --write-co[...]lID2T.json -v {
    not ok 1 - Exit Value Check
    # Failed test 'Exit Value Check'
    # at t/integration/coverage.t line 17.
    # +------+----+-------+
    # | GOT  | OP | CHECK |
    # +------+----+-------+
    # | 2816 | eq | 0     |
    # +------+----+-------+
    # Command = /usr/bin/perl /home/test/fedora/perl-Test2-Harness/Test2-Harness-1.000048/scripts/yath -Dt/integration/coverage/lib -D/home/test/fedora/perl-Test2-Harness/Test2-Harness-1.000048/blib/lib test -I/home/test/fedora/perl-Test2-Harness/Test2-Harness-1.000048/blib/lib -It/integration/coverage/lib t/integration/coverage --ext=tx --write-coverage=/tmp/VbmRQlID2T.json -v
    # Exit = 2816
    # ==== Output ====
    # ( LAUNCH )  job  1    t/integration/coverage/a.tx
    # ( STDOUT )  job  1    INPUT t/integration/coverage/a.tx: {"stdin":"","env":{},"argv":[]}
    # (  NOTE  )  job  1    Seeded srand with seed '20210426' from local date.
    # [  PASS  ]  job  1  + Got c
    # [  PASS  ]  job  1  +~a
    # [  PASS  ]  job  1    + Got a
    # [  PASS  ]  job  1    + Got aa
    # [  PLAN  ]  job  1    | Expected assertions: 2
    #             job  1    ^
    # [  PASS  ]  job  1  +~b
    # [  PASS  ]  job  1    + Got a
    # [  PASS  ]  job  1    + Got b
    # [  PLAN  ]  job  1    | Expected assertions: 2
    #             job  1    ^
    # [  PASS  ]  job  1  +~c
    # [  PASS  ]  job  1    + Got a
    # [  PASS  ]  job  1    + Got b
    # [  PASS  ]  job  1    + Got c
    # [  PLAN  ]  job  1    | Expected assertions: 3
    #             job  1    ^
    # [  PLAN  ]  job  1    Expected assertions: 4
    # (COVERAGE)  job  1    This test covered 3 source files.
    # Not a HASH reference at /home/test/fedora/perl-Test2-Harness/Test2-Harness-1.000048/lib/Test2/Harness/Log/CoverageAggregator.pm line 61, <__ANONIO__> line 28.
    # 
    # 
    # ========
    1..1
}

Upgrading Test2::Plugin::Cover to 0.000022 fixes it. I believe that either the dependency expresses in META.json ("Test2::Plugin::Cover" : "0.000022") should be a hard-dependency, or the test should cope with older Test2::Plugin::Cover. The test still requires an older version:

use Test2::Require::Module 'Test2::Plugin::Cover' => '0.000018';