Skip to content

Commit 1f22b8d

Browse files
committed
t/test_pl.pod: document the new setup_multiple_progs() PREAMBLE
1 parent 147d5f1 commit 1f22b8d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

t/test_pl.pod

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ Scan the given files for tests to be run by run_multiple_progs().
318318
This is currently only used by F<t/lib/common.pl> which itself is used
319319
by most tests that use run_multiple_progs() on other files.
320320

321-
Test files parsed by setup_multiple_progs() ignore any lines until a
321+
Test files parsed by setup_multiple_progs() ignore most lines until a
322322
C<__END__> line is found.
323323

324324
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>
774774
OPTIONS fatal
775775
Time to die at - line 1.
776776

777-
Test files parsed by setup_multiple_progs() ignore any lines until a
777+
Test files parsed by setup_multiple_progs() ignore most lines until a
778778
C<__END__> line is found. This includes any test file based on
779779
F<t/lib/common.pl>.
780780

781+
The lines that aren't ignored here by setup_multiple_progs() have the
782+
form:
783+
784+
/^#\s+PREAMBLE\s+(.*)$/
785+
786+
where each matching line (excluding the C<# PREAMBLE>) is prepended to
787+
the code for each test case.
788+
781789
Tests are separated by lines containing exactly eight C<#>.
782790

783791
A test (both code and expected result) can contain text matching

0 commit comments

Comments
 (0)