@matheusbsbs / matheus-bagliano / commits / 72942a617c
Fork 0

t/README: unify documentation of test function args

Document all test function arguments in the same way. While at it, tweak the description of test_path_is_* (thanks to Junio), and correct some grammatical errors. Signed-off-by: Mathias Lafeldt <misfire@debugon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Mathias Lafeldt committed Apr 26, 2011 at 12:33 UTC 72942a617cb1f6e1844a7391d030c15acd2ca052
1 file changed +9 -8
t/README
+9 -8
@@ -379,7 +379,7 @@ library for your script to use.
379
380 - test_expect_success [<prereq>] <message> <script>
381
382 - Usually takes two strings as parameter, and evaluates the
382 + Usually takes two strings as parameters, and evaluates the
383 <script>. If it yields success, test is considered
384 successful. <message> should state what it is testing.
385
@@ -390,7 +390,7 @@ library for your script to use.
390 'tree=$(git-write-tree)'
391
392 If you supply three parameters the first will be taken to be a
393 - prerequisite, see the test_set_prereq and test_have_prereq
393 + prerequisite; see the test_set_prereq and test_have_prereq
394 documentation below:
395
396 test_expect_success TTY 'git --paginate rev-list uses a pager' \
@@ -446,7 +446,7 @@ library for your script to use.
446 Merges the given rev using the given message. Like test_commit,
447 creates a tag and calls test_tick before committing.
448
449 - - test_set_prereq SOME_PREREQ
449 + - test_set_prereq <prereq>
450
451 Set a test prerequisite to be used later with test_have_prereq. The
452 test-lib will set some prerequisites for you, see the
@@ -456,7 +456,7 @@ library for your script to use.
456 test_have_prereq directly, or the three argument invocation of
457 test_expect_success and test_expect_failure.
458
459 - - test_have_prereq SOME PREREQ
459 + - test_have_prereq <prereq>
460
461 Check if we have a prerequisite previously set with
462 test_set_prereq. The most common use of this directly is to skip
@@ -526,12 +526,13 @@ library for your script to use.
526
527 Check whether a file has the length it is expected to.
528
529 - - test_path_is_file <file> [<diagnosis>]
530 - test_path_is_dir <dir> [<diagnosis>]
529 + - test_path_is_file <path> [<diagnosis>]
530 + test_path_is_dir <path> [<diagnosis>]
531 test_path_is_missing <path> [<diagnosis>]
532
533 - Check whether a file/directory exists or doesn't. <diagnosis> will
534 - be displayed if the test fails.
533 + Check if the named path is a file, if the named path is a
534 + directory, or if the named path does not exist, respectively,
535 + and fail otherwise, showing the <diagnosis> text.
536
537 - test_when_finished <script>
538