t/helper: merge test-regex into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2018-03-24 08:44:53 +01:00
committed by Junio C Hamano
parent 65370d81ef
commit 9038531f1b
6 changed files with 9 additions and 6 deletions

View File

@ -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++;