]> git.ipfire.org Git - thirdparty/git.git/commit
t/unit-tests: handle dashes in test suite filenames
authorSeyi Kuforiji <kuforiji98@gmail.com>
Fri, 17 Jan 2025 12:29:23 +0000 (13:29 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 17 Jan 2025 22:35:11 +0000 (14:35 -0800)
commitaae2b431b003e7c55a1e359062c8547e6521098f
tree111c8cb082a8cfb4d5c0b137525365f58c117307
parent757161efcca150a9a96b312d9e780a071e601a03
t/unit-tests: handle dashes in test suite filenames

"generate-clar-decls.sh" script is designed to extract function
signatures that match a specific pattern derived from the unit test
file's name. The script does not know to massage file names with dashes,
which will make it search for functions that look like, for example,
`test_mem-pool_*`. Having dashes in function names is not allowed
though, so these patterns won't ever match a legal function name.

Adapt script to translate dashes (`-`) in test suite filenames to
underscores (`_`) to correctly extract the function signatures and run
the corresponding tests. This will be used by subsequent commits which
follows the same construct.

Mentored-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Seyi Kuforiji <kuforiji98@gmail.com>
Acked-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/unit-tests/generate-clar-decls.sh