lab-measurement / Lab-Measurement

Lab::Measurement allows to perform test and measurement tasks with Perl scripts.
https://www.labmeasurement.de/
Other
10 stars 11 forks source link

encoding::warnings is not supported on Perl 5.26.0 and later #7

Closed eserte closed 8 years ago

eserte commented 8 years ago

Th test suite fails with the development perl 5.25.3:

...
ok 64 - load Lab/Exception/Base.pm
# trying to load Lab/Data/XMLtree.pm ...

"WARNING" in Lab::GenericSignals:
encoding::warnings is not supported on Perl 5.26.0 and later at /usr/perl5.25.3p/lib/5.25.3/encoding/warnings.pm line 166.
        encoding::warnings::import(** Incomplete caller override detected; @DB::args were not set **) called at /home/cpansand/.cpan/build/2016080800/Lab-Measurement-3.515-0/blib/lib/Lab/Data/XMLtree.pm line 46
        Lab::Data::XMLtree::BEGIN(** Incomplete caller override detected; @DB::args were not set **) called at /home/cpansand/.cpan/build/2016080800/Lab-Measurement-3.515-0/blib/lib/Lab/Data/XMLtree.pm line 46
        eval {...} called at /home/cpansand/.cpan/build/2016080800/Lab-Measurement-3.515-0/blib/lib/Lab/Data/XMLtree.pm line 46
        require Lab/Data/XMLtree.pm called at t/00-load.t line 85

(eval)() called at t/00-load.t line 85
ok 65 - load Lab/Data/XMLtree.pm
...
eserte commented 8 years ago

While this does not generate a "not ok" it seems to somehow confuse Test::Harness. Build test reports:

Test Summary Report
-------------------
t/00-load.t          (Wstat: 0 Tests: 100 Failed: 0)
  Parse errors: Tests out of sequence.  Found (66) but expected (65)
                Tests out of sequence.  Found (67) but expected (66)
                Tests out of sequence.  Found (68) but expected (67)
                Tests out of sequence.  Found (69) but expected (68)
                Tests out of sequence.  Found (70) but expected (69)
amba commented 8 years ago

The Test::Harness confusion should be fixed in

commit f7a13c2aa169ff8d709bd099802c99167b954f10 Author: Simon Reinhardt simon.reinhardt@stud.uni-regensburg.de Date: Sun Aug 7 17:59:58 2016 +0200

IO/Interface/Term.pm: Do not confuse TAP::Harness.

Insert an additonal newline.
Otherwise, you can get an ansi color code mixed into the output of Test::More.

Example:

print "lala\n";
ok (1 == 1, "some test");

so far resulted in the output
1..1
ESC[sESC[uESC[0J
ESC[1;34;47m"MESSAGE" in main:ESC[0m
ESC[sESC[uESC[0Jlala
ESC[sok 1 - some test

but TAP::Harness expect's the "ok" at start of line.

Does this solve it for you?

eserte commented 8 years ago

Yes --- with 0f8032b45fe11e3dc2390e715b0922553199e7c0 it fails and with 0284dacc73864448939ec423193d9953fe49e1be it passes.