diff mbox series

[v2,4/5] test-helpers: rename "path-utils is_valid_path" to "is-valid-paths"

Message ID patch-4.5-ae5dc5d03b3-20210421T144921Z-avarab@gmail.com (mailing list archive)
State Superseded
Headers show
Series test-lib-functions.sh: trickery to make -x less verbose | expand

Commit Message

Ævar Arnfjörð Bjarmason April 21, 2021, 2:58 p.m. UTC
Rename this utility added in d2c84dad1c8 (mingw: refuse to access
paths with trailing spaces or periods, 2019-09-05) to make it clear
that it expects N number of arguments, and for consistency with
dc2d9ba3187 (is_{hfs,ntfs}_dotgitmodules: add tests, 2018-05-12).

Let's also make it a dashed "is-valid-paths" instead of
"is_valid_path*" to make it easier to grep the helper v.s. the C
function it calls.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/helper/test-path-utils.c | 2 +-
 t/t0060-path-utils.sh      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/t/helper/test-path-utils.c b/t/helper/test-path-utils.c
index 3d7c0f1d19d..af7d7fd5454 100644
--- a/t/helper/test-path-utils.c
+++ b/t/helper/test-path-utils.c
@@ -423,7 +423,7 @@  int cmd__path_utils(int argc, const char **argv)
 	if (argc > 1 && !strcmp(argv[1], "protect_ntfs_hfs"))
 		return !!protect_ntfs_hfs_benchmark(argc - 1, argv + 1);
 
-	if (argc > 1 && !strcmp(argv[1], "is_valid_path")) {
+	if (argc > 1 && !strcmp(argv[1], "is-valid-paths")) {
 		int res = 0, expect = 1, i;
 
 		for (i = 2; i < argc; i++)
diff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh
index 0ff06b5d1b3..e7fb748b19c 100755
--- a/t/t0060-path-utils.sh
+++ b/t/t0060-path-utils.sh
@@ -469,7 +469,7 @@  test_expect_success 'match .gitmodules' '
 '
 
 test_expect_success MINGW 'is_valid_path() on Windows' '
-	test-tool path-utils is_valid_path \
+	test-tool path-utils is-valid-paths \
 		win32 \
 		"win32 x" \
 		../hello.txt \