@matheusbsbs / matheus-bagliano / commits / be53deef0d
Fork 0

t/README: Document the predefined test prerequisites

The README for the test library suggested that you grep the test-lib.sh for test_set_prereq to see what the preset prerequisites were. Remove that bit, and write a section explaining all the preset prerequisites. Most of the text was lifted from from Junio C Hamano and Johannes Sixt, See the "Tests in Cygwin" thread in May 2009 for the originals: http://thread.gmane.org/gmane.comp.version-control.git/116729/focus=118385 http://thread.gmane.org/gmane.comp.version-control.git/116729/focus=118434 Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Aug 6, 2010 at 21:19 UTC be53deef0d94b80b0a2df465d16f21ed29c3165b
1 file changed +40 -5
t/README
+40 -5
@@ -410,11 +410,12 @@ library for your script to use.
410 - test_set_prereq SOME_PREREQ
411
412 Set a test prerequisite to be used later with test_have_prereq. The
413 - test-lib will set some prerequisites for you, e.g. PERL and PYTHON
414 - which are derived from ./GIT-BUILD-OPTIONS (grep test_set_prereq
415 - test-lib.sh for more). Others you can set yourself and use later
416 - with either test_have_prereq directly, or the three argument
417 - invocation of test_expect_success and test_expect_failure.
413 + test-lib will set some prerequisites for you, see the
414 + "Prerequisites" section below for a full list of these.
415 +
416 + Others you can set yourself and use later with either
417 + test_have_prereq directly, or the three argument invocation of
418 + test_expect_success and test_expect_failure.
419
420 - test_have_prereq SOME PREREQ
421
@@ -487,6 +488,40 @@ library for your script to use.
488 ...
489 '
490
491 +Prerequisites
492 +-------------
493 +
494 +These are the prerequisites that the test library predefines with
495 +test_have_prereq.
496 +
497 +See the prereq argument to the test_* functions in the "Test harness
498 +library" section above and the "test_have_prereq" function for how to
499 +use these, and "test_set_prereq" for how to define your own.
500 +
501 + - PERL & PYTHON
502 +
503 + Git wasn't compiled with NO_PERL=YesPlease or
504 + NO_PYTHON=YesPlease. Wrap any tests that need Perl or Python in
505 + these.
506 +
507 + - POSIXPERM
508 +
509 + The filesystem supports POSIX style permission bits.
510 +
511 + - BSLASHPSPEC
512 +
513 + Backslashes in pathspec are not directory separators. This is not
514 + set on Windows. See 6fd1106a for details.
515 +
516 + - EXECKEEPSPID
517 +
518 + The process retains the same pid across exec(2). See fb9a2bea for
519 + details.
520 +
521 + - SYMLINKS
522 +
523 + The filesystem we're on supports symbolic links. E.g. a FAT
524 + filesystem doesn't support these. See 704a3143 for details.
525
526 Tips for Writing Tests
527 ----------------------