Subject: | when we make prints in .t file without newline then prove fails |
Let's say i have the file a.t
use strict;
use Test::More;
print scalar localtime time;
ok(1,'kuku');
done_testing();
~
Then the prove fails
prove a.t
a.t .. Failed 1/1 subtests
Test Summary Report
-------------------
a.t (Wstat: 0 Tests: 0 Failed: 0)
Parse errors: Bad plan. You planned 1 tests but ran 0.
Files=1, Tests=0, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.02 cusr
0.00 csys = 0.05 CPU)
Result: FAIL
If i add a print "\n";
it works
use strict;
use Test::More;
print scalar localtime time;
print "\n";
ok(1,'kuku');
done_testing();
~
prove a.t
a.t .. ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.04 usr 0.01 sys + 0.02 cusr
0.00 csys = 0.07 CPU)
Result: PASS
This means that any print without newline destroys the prove analysis.
I also did not see that it is documented anywhere