Hi,
On 2022-02-14 16:08:42 +0000, Dagfinn Ilmari Mannsåker wrote:
> die()-ing is the correct way to abort a single test script.
There's really no way to nice way to abort without the "Dubious, test returned
255 (wstat 65280, 0xff00)" stuff?
Even just getting rid of the "Tests were run but no plan was declared and
done_testing() was not seen." noise would be helpful. So I think using a fatal
error routine that forced a failure to be recognized via ok(0, 'fatal error')
and then does done_testing() would be better...
> t/die-immediately.t .... aieee at t/die-immediately.t line 1.
> t/die-immediately.t .... Dubious, test returned 255 (wstat 65280, 0xff00)
> No subtests run
Hm. Looks different when a test is including our test helpers.
t/000_die_pg_test_utils.pl .. Dubious, test returned 25 (wstat 6400, 0x1900)
No subtests run
t/000_die_test_more.pl ...... error at t/000_die_test_more.pl line 2.
t/000_die_test_more.pl ...... Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
So I think we broke something... I think it's the log file redirection stuff
in INIT.
Greetings,
Andres Freund