test-lib tests: don't provide a description for the sub-tests
Change the $test_description provided for the generated subtests to be constant, since the only purpose of having it is that test-lib.sh will barf if it isn't supplied. The other purpose of having it was to effectively split up the test description between the argument to test_expect_success and the argument to "write_and_run_sub_test_lib_test". Let's only use one of the two. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
9f0a45208d
commit
c3ff7be6fb
@ -1,12 +1,8 @@
|
||||
write_sub_test_lib_test () {
|
||||
name="$1" descr="$2" # stdin is the body of the test code
|
||||
name="$1" # stdin is the body of the test code
|
||||
mkdir "$name" &&
|
||||
write_script "$name/$name.sh" "$TEST_SHELL_PATH" <<-EOF &&
|
||||
test_description='$descr (run in sub test-lib)
|
||||
|
||||
This is run in a sub test-lib so that we do not get incorrect
|
||||
passing metrics
|
||||
'
|
||||
test_description='A test of test-lib.sh itself'
|
||||
|
||||
# Point to the t/test-lib.sh, which isn't in ../ as usual
|
||||
. "\$TEST_DIRECTORY"/test-lib.sh
|
||||
@ -15,8 +11,8 @@ write_sub_test_lib_test () {
|
||||
}
|
||||
|
||||
_run_sub_test_lib_test_common () {
|
||||
neg="$1" name="$2" descr="$3" # stdin is the body of the test code
|
||||
shift 3
|
||||
neg="$1" name="$2" # stdin is the body of the test code
|
||||
shift 2
|
||||
|
||||
# intercept pseudo-options at the front of the argument list that we
|
||||
# will not pass to child script
|
||||
|
||||
Reference in New Issue
Block a user