summaryrefslogtreecommitdiff
path: root/t/README
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2021-02-12 14:29:41 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-02-12 11:58:21 -0800
commit45a2686441b0ea53ad9acef8b01dad2efdd98a90 (patch)
tree11478fa7550d182219a1cd47f6ed0dc8cd280eb4 /t/README
parenttest libs: rename "diff-lib" to "lib-diff" (diff)
downloadtgif-45a2686441b0ea53ad9acef8b01dad2efdd98a90.tar.xz
test-lib-functions: remove bug-inducing "diagnostics" helper param
Remove the optional "diagnostics" parameter of the test_path_is_{file,dir,missing} functions. We have a lot of uses of these functions, but the only legitimate use of the diagnostics parameter is from when the functions themselves were introduced in 2caf20c52b7 (test-lib: user-friendly alternatives to test [-d|-f|-e], 2010-08-10). But as the the rest of this diff demonstrates its presence did more to silently introduce bugs in our tests. Fix such bugs in the tests added in ae4e89e549b (gc: add --keep-largest-pack option, 2018-04-15), and c04ba51739a (t6046: testcases checking whether updates can be skipped in a merge, 2018-04-19). Let's also assert that those functions are called with exactly one parameter, a follow-up commit will add similar asserts to other functions in test-lib-functions.sh that we didn't have existing misuse of. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/README')
-rw-r--r--t/README8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/README b/t/README
index c730a70770..df38d8d6be 100644
--- a/t/README
+++ b/t/README
@@ -917,13 +917,13 @@ library for your script to use.
Check whether a file has the length it is expected to.
- - test_path_is_file <path> [<diagnosis>]
- test_path_is_dir <path> [<diagnosis>]
- test_path_is_missing <path> [<diagnosis>]
+ - test_path_is_file <path>
+ test_path_is_dir <path>
+ test_path_is_missing <path>
Check if the named path is a file, if the named path is a
directory, or if the named path does not exist, respectively,
- and fail otherwise, showing the <diagnosis> text.
+ and fail otherwise.
- test_when_finished <script>