summaryrefslogtreecommitdiffstats
path: root/t/helper
diff options
context:
space:
mode:
Diffstat (limited to 't/helper')
-rw-r--r--t/helper/test-regex.c7
-rw-r--r--t/helper/test-tool.c1
-rw-r--r--t/helper/test-tool.h1
3 files changed, 6 insertions, 3 deletions
diff --git a/t/helper/test-regex.c b/t/helper/test-regex.c
index b5ea8a97c5..10284cc56f 100644
--- a/t/helper/test-regex.c
+++ b/t/helper/test-regex.c
@@ -1,3 +1,4 @@
+#include "test-tool.h"
#include "git-compat-util.h"
#include "gettext.h"
@@ -36,7 +37,7 @@ static int test_regex_bug(void)
return 0;
}
-int cmd_main(int argc, const char **argv)
+int cmd__regex(int argc, const char **argv)
{
const char *pat;
const char *str;
@@ -47,8 +48,8 @@ int cmd_main(int argc, const char **argv)
if (argc == 2 && !strcmp(argv[1], "--bug"))
return test_regex_bug();
else if (argc < 3)
- usage("test-regex --bug\n"
- "test-regex <pattern> <string> [<options>]");
+ usage("test-tool regex --bug\n"
+ "test-tool regex <pattern> <string> [<options>]");
argv++;
pat = *argv++;
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index 706f88c482..37f17334dc 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c
@@ -28,6 +28,7 @@ static struct test_cmd cmds[] = {
{ "prio-queue", cmd__prio_queue },
{ "read-cache", cmd__read_cache },
{ "ref-store", cmd__ref_store },
+ { "regex", cmd__regex },
{ "sha1", cmd__sha1 },
};
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index 2b5cc6e117..5f73c83ac0 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h
@@ -22,6 +22,7 @@ int cmd__path_utils(int argc, const char **argv);
int cmd__prio_queue(int argc, const char **argv);
int cmd__read_cache(int argc, const char **argv);
int cmd__ref_store(int argc, const char **argv);
+int cmd__regex(int argc, const char **argv);
int cmd__sha1(int argc, const char **argv);
#endif