Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-09-22 14:19:49 +0300
committerJunio C Hamano <gitster@pobox.com>2021-09-23 02:22:41 +0300
commitc3ff7be6fb04c3150a8496271901a4a918c2c70c (patch)
tree77774ae5191d341970fc7caa4e3b1b396e9037e5 /t/lib-subtest.sh
parent9f0a45208dbc488da790d0f2ef1491eb2aa858c2 (diff)
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>
Diffstat (limited to 't/lib-subtest.sh')
-rw-r--r--t/lib-subtest.sh12
1 files changed, 4 insertions, 8 deletions
diff --git a/t/lib-subtest.sh b/t/lib-subtest.sh
index 21fa570d0b..cdbc2d9332 100644
--- a/t/lib-subtest.sh
+++ b/t/lib-subtest.sh
@@ -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