]> git.ipfire.org Git - thirdparty/git.git/commit
u-string-list: move "test_split" into "u-string-list.c"
authorshejialuo <shejialuo@gmail.com>
Sun, 29 Jun 2025 04:28:14 +0000 (12:28 +0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Jul 2025 15:07:46 +0000 (08:07 -0700)
commit07d90fda58c79af661016137cbbafab169eeb329
treeb2ebd12674587f9a88b04f939176a95a6572bd0b
parent67cfd2924d099b3316ddf579ba7c11fdc29ad2b6
u-string-list: move "test_split" into "u-string-list.c"

We rely on "test-tool string-list" command to test the functionality of
the "string-list". However, as we have introduced clar test framework,
we'd better move the shell script into C program to improve speed and
readability.

Create a new file "u-string-list.c" under "t/unit-tests", then update
the Makefile and "meson.build" to build the file. And let's first move
"test_split" into unit test and gradually convert the shell script into
C program.

In order to create `string_list` easily by simply specifying strings in
the function call, create "t_vcreate_string_list_dup" function to do
this.

Then port the shell script tests to C program and remove unused
"test-tool" code and tests.

Signed-off-by: shejialuo <shejialuo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
t/helper/test-string-list.c
t/meson.build
t/t0063-string-list.sh
t/unit-tests/u-string-list.c [new file with mode: 0644]