t/test_pl.pod: document the new setup_multiple_progs() PREAMBLE

This commit is contained in:
Tony Cook 2025-10-22 09:26:22 +11:00
parent 147d5f1b9e
commit 1f22b8d1e5

View File

@ -318,7 +318,7 @@ Scan the given files for tests to be run by run_multiple_progs().
This is currently only used by F<t/lib/common.pl> which itself is used
by most tests that use run_multiple_progs() on other files.
Test files parsed by setup_multiple_progs() ignore any lines until a
Test files parsed by setup_multiple_progs() ignore most lines until a
C<__END__> line is found.
So in general, just use F<t/lib/common.pl>, see F<t/lib/croak.t> and
@ -774,10 +774,18 @@ C<PERL_RUNPERL_DEBUG>
OPTIONS fatal
Time to die at - line 1.
Test files parsed by setup_multiple_progs() ignore any lines until a
Test files parsed by setup_multiple_progs() ignore most lines until a
C<__END__> line is found. This includes any test file based on
F<t/lib/common.pl>.
The lines that aren't ignored here by setup_multiple_progs() have the
form:
/^#\s+PREAMBLE\s+(.*)$/
where each matching line (excluding the C<# PREAMBLE>) is prepended to
the code for each test case.
Tests are separated by lines containing exactly eight C<#>.
A test (both code and expected result) can contain text matching