Skip to content

Commit c600a91

Browse files
rybakgitster
authored andcommitted
test-lib: drop comment about test_description
When a comment describing how each test file should start was added in commit [1], it was the second comment of t/test-lib.sh. The comment describes how variable "test_description" is supposed to be assigned at the top of each test file and how "test-lib.sh" should be used by sourcing it. However, even in [1], the comment was ten lines away from the usage of the variable by test-lib.sh. Since then, the comment has drifted away both from the top of the file and from the usage of the variable. The comment just sits in the middle of the initialization of the test library, surrounded by unrelated code, almost one hundred lines away from the usage of "test_description". Nobody has noticed this drift during evolution of test-lib.sh, which suggests that this comment has outlived its usefulness. The assignment of "test_description", sourcing of "test-lib.sh" by tests, and the process of writing tests in general are described in detail in "t/README". So drop the obsolete comment. An alternative solution could be to move the comment either to the top of the file, or down to the usage of variable "test_description". [1] e1970ce ("[PATCH 1/2] Test framework take two.", 2005-05-13) Signed-off-by: Andrei Rybak <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 768bb23 commit c600a91

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

t/test-lib.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -645,12 +645,6 @@ u200c=$(printf '\342\200\214')
645645

646646
export _x05 _x35 LF u200c EMPTY_TREE EMPTY_BLOB ZERO_OID OID_REGEX
647647

648-
# Each test should start with something like this, after copyright notices:
649-
#
650-
# test_description='Description of this test...
651-
# This test checks if command xyzzy does the right thing...
652-
# '
653-
# . ./test-lib.sh
654648
test "x$TERM" != "xdumb" && (
655649
test -t 1 &&
656650
tput bold >/dev/null 2>&1 &&

0 commit comments

Comments
 (0)