summaryrefslogtreecommitdiff
path: root/t/lib-subtest.sh
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2021-09-22 13:19:49 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-22 16:22:41 -0700
commitc3ff7be6fb04c3150a8496271901a4a918c2c70c (patch)
tree77774ae5191d341970fc7caa4e3b1b396e9037e5 /t/lib-subtest.sh
parenttest-lib tests: split up "write and run" into two functions (diff)
downloadtgif-c3ff7be6fb04c3150a8496271901a4a918c2c70c.tar.xz
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