atoomic / perl

a repo to show what could be p7
Other
18 stars 8 forks source link

dist/Storable/t/code.t: test failure when run with warnings on by default #319

Open jkeenan opened 4 years ago

jkeenan commented 4 years ago

This problem appears to be similar to that reported in https://github.com/atoomic/perl/issues/317 in that deparsing something injects use warnings; into the output once we're running with warnings on by default.

In the alpha-dev-03-warnings branch:

$ cd t; ./perl harness -v ../dist/Storable/t/code.t ; cd -

ok 1
...
ok 37
not ok 38 - no errors

#   Failed test 'no errors'
#   at t/code.t line 215.
#          got: 'code sub {
#     use warnings;
#     'JAPH';
# } caused an error: 'require' trapped by operation mask at (eval 92) line 2, at t/code.t line 214.
# '
#     expected: ''
Not a CODE reference at t/code.t line 216.
# Looks like your test exited with 25 just after 38.
Dubious, test returned 25 (wstat 6400, 0x1900)
Failed 26/63 subtests 

Test Summary Report
-------------------
../dist/Storable/t/code.t (Wstat: 6400 Tests: 38 Failed: 1)
  Failed test:  38
  Non-zero exit status: 25
  Parse errors: Bad plan.  You planned 63 tests but ran 38.
Files=1, Tests=38,  1 wallclock secs ( 0.02 usr  0.01 sys +  0.30 cusr  0.02 csys =  0.34 CPU)
Result: FAIL

@atoomic, can you take a look?

Thank you very much. Jim Keenan