summaryrefslogtreecommitdiff
path: root/t/helper
diff options
context:
space:
mode:
Diffstat (limited to 't/helper')
-rw-r--r--t/helper/test-string-list.c3
-rw-r--r--t/helper/test-tool.c1
-rw-r--r--t/helper/test-tool.h1
3 files changed, 4 insertions, 1 deletions
diff --git a/t/helper/test-string-list.c b/t/helper/test-string-list.c
index 829ec3d7d2..2123dda85b 100644
--- a/t/helper/test-string-list.c
+++ b/t/helper/test-string-list.c
@@ -1,3 +1,4 @@
+#include "test-tool.h"
#include "cache.h"
#include "string-list.h"
@@ -41,7 +42,7 @@ static int prefix_cb(struct string_list_item *item, void *cb_data)
return starts_with(item->string, prefix);
}
-int cmd_main(int argc, const char **argv)
+int cmd__string_list(int argc, const char **argv)
{
if (argc == 5 && !strcmp(argv[1], "split")) {
struct string_list list = STRING_LIST_INIT_DUP;
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index 6acbf976d8..c67307c28b 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c
@@ -36,6 +36,7 @@ static struct test_cmd cmds[] = {
{ "sha1", cmd__sha1 },
{ "sigchain", cmd__sigchain },
{ "strcmp-offset", cmd__strcmp_offset },
+ { "string-list", cmd__string_list },
};
int cmd_main(int argc, const char **argv)
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index 035e82ec6a..19ad2b0df8 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h
@@ -30,5 +30,6 @@ int cmd__sha1_array(int argc, const char **argv);
int cmd__sha1(int argc, const char **argv);
int cmd__sigchain(int argc, const char **argv);
int cmd__strcmp_offset(int argc, const char **argv);
+int cmd__string_list(int argc, const char **argv);
#endif