Camelcade/TAP-Formatter-Camelcade

dying test is shown as successful

Closed this issue · 0 comments

When runnig a test that unexpectedly dies the test results are shown as successful in the result tree although the Test Summary Report says "FAIL".

I can work around this by wrapping everything in an eval, but it would be cleaner to check for the return code returned by prove.

Example:

#!/usr/bin/env perl
use Test::More;
ok( 1,   'first test' );
ok( die, 'second test' );
ok( 1,   'third test' );
done_testing();

image

Died at /home/bla/99_test.t line 6.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 255 just after 1.

Test Summary Report
-------------------
/home/bla/99_test.t (Wstat: 65280 Tests: 1 Failed: 0)
  Non-zero exit status: 255
  Parse errors: No plan found in TAP output
Files=1, Tests=1,  0 wallclock secs ( 0.03 usr  0.01 sys +  0.11 cusr  0.01 csys =  0.16 CPU)
Result: FAIL

PyCharm 2020.3 (Professional Edition)
Build #PY-203.5981.165, built on December 14, 2020
Runtime version: 11.0.9+11-b1145.21 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.4.0-58-generic