Skip to content

Commit 2fac6a4

Browse files
avargitster
authored andcommitted
t/README: Document test_external*
There was do documentation for the test_external_without_stderr and test_external functions. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 9a89789 commit 2fac6a4

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

t/README

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,33 @@ library for your script to use.
330330
test_done
331331
fi
332332

333+
- test_external [<prereq>] <message> <external> <script>
334+
335+
Execute a <script> with an <external> interpreter (like perl). This
336+
was added for tests like t9700-perl-git.sh which do most of their
337+
work in an external test script.
338+
339+
test_external \
340+
'GitwebCache::*FileCache*' \
341+
"$PERL_PATH" "$TEST_DIRECTORY"/t9503/test_cache_interface.pl
342+
343+
If the test is outputting its own TAP you should set the
344+
test_external_has_tap variable somewhere before calling the first
345+
test_external* function. See t9700-perl-git.sh for an example.
346+
347+
# The external test will outputs its own plan
348+
test_external_has_tap=1
349+
350+
- test_external_without_stderr [<prereq>] <message> <external> <script>
351+
352+
Like test_external but fail if there's any output on stderr,
353+
instead of checking the exit code.
354+
355+
test_external_without_stderr \
356+
'Perl API' \
357+
"$PERL_PATH" "$TEST_DIRECTORY"/t9700/test.pl
358+
359+
333360
Tips for Writing Tests
334361
----------------------
335362

0 commit comments

Comments
 (0)