git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 5/8] t/README: Document test_external*

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jul 1, 2010, 20:17 UTC
Message-ID
<1278015478-6920-6-git-send-email-avarab@gmail.com>
In-Reply-To
<1278015478-6920-1-git-send-email-avarab@gmail.com>

There was do documentation for the test_external_without_stderr and test_external functions.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/README |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/t/README b/t/README
index 2df56a8..d9b5294 100644
--- a/t/README
+++ b/t/README
@@ -330,6 +330,33 @@ library for your script to use.
 	    test_done
 	fi
 
+ - test_external [<prereq>] <message> <external> <script>
+
+   Execute a <script> with an <external> interpreter (like perl). This
+   was added for tests like t9700-perl-git.sh which do most of their
+   work in an external test script.
+
+	test_external_without_stderr \
+	    'Perl API' \
+	    "$PERL_PATH" "$TEST_DIRECTORY"/t9700/test.pl
+
+   If the test is outputting its own TAP you should set the
+   test_external_has_tap variable somewhere before calling the first
+   test_external* function. See t9700-perl-git.sh for an example.
+
+	# The external test will outputs its own plan
+	test_external_has_tap=1
+
+ - test_external_without_stderr [<prereq>] <message> <external> <script>
+
+   Like test_external but fail if there's any output on stderr,
+   instead of checking the exit code.
+
+	test_external_without_stderr \
+	    'Perl API' \
+	    "$PERL_PATH" "$TEST_DIRECTORY"/t9700/test.pl
+
+
 Tips for Writing Tests
 ----------------------
 
-- 
1.7.1.251.g92a7
Previous: Ævar Arnfjörð BjarmasonNext: Jakub Narebski
Message 8 of 14 in “Improvements for t/README”
  1. 0/8 Improvements for t/READMEÆvar Arnfjörð Bjarmason, Jul 1, 2010
  2. 1/8 t/README: Tests are all +x, ./test, not sh ./testÆvar Arnfjörð Bjarmason, Jul 1, 2010
  3. Junio C HamanoJul 1, 2010
  4. Ævar Arnfjörð BjarmasonJul 2, 2010
  5. 2/8 t/README: The trash is in 't/trash directory.$name'Ævar Arnfjörð Bjarmason, Jul 1, 2010
  6. 3/8 t/README: Typo: paralell -> parallelÆvar Arnfjörð Bjarmason, Jul 1, 2010
  7. 4/8 t/README: Document the prereq functions, and 3-arg test_*Ævar Arnfjörð Bjarmason, Jul 1, 2010
  8. 5/8 t/README: Document test_external*Ævar Arnfjörð Bjarmason, Jul 1, 2010
  9. Jakub NarebskiJul 1, 2010
  10. 5/8 t/README: Document test_external*Ævar Arnfjörð Bjarmason, Jul 1, 2010
  11. 6/8 t/README: Document test_expect_codeÆvar Arnfjörð Bjarmason, Jul 1, 2010
  12. 7/8 t/README: Add a section about skipping testsÆvar Arnfjörð Bjarmason, Jul 1, 2010
  13. 8/8 t/README: Document the do's and don'ts of testsÆvar Arnfjörð Bjarmason, Jul 1, 2010
  14. Jeff KingJul 2, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.