Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t/helper: merge test-regex into test-tool
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sat, 24 Mar 2018 07:44:53 +0000
(08:44 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 27 Mar 2018 15:45:47 +0000
(08:45 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
patch
|
blob
|
history
t/helper/test-regex.c
patch
|
blob
|
history
t/helper/test-tool.c
patch
|
blob
|
history
t/helper/test-tool.h
patch
|
blob
|
history
t/t0070-fundamental.sh
patch
|
blob
|
history
t/t7812-grep-icase-non-ascii.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
65370d8
)
diff --git
a/Makefile
b/Makefile
index 20080fddb8d03b9ff6f88d5e2f38bab1a8b189bc..7444c00bbba8468aa11b31307b6fd60430dea070 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-673,6
+673,7
@@
TEST_BUILTINS_OBJS += test-path-utils.o
TEST_BUILTINS_OBJS += test-prio-queue.o
TEST_BUILTINS_OBJS += test-read-cache.o
TEST_BUILTINS_OBJS += test-ref-store.o
TEST_BUILTINS_OBJS += test-prio-queue.o
TEST_BUILTINS_OBJS += test-read-cache.o
TEST_BUILTINS_OBJS += test-ref-store.o
+TEST_BUILTINS_OBJS += test-regex.o
TEST_BUILTINS_OBJS += test-sha1.o
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
TEST_BUILTINS_OBJS += test-sha1.o
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
@@
-681,7
+682,6
@@
TEST_PROGRAMS_NEED_X += test-fake-ssh
TEST_PROGRAMS_NEED_X += test-line-buffer
TEST_PROGRAMS_NEED_X += test-parse-options
TEST_PROGRAMS_NEED_X += test-write-cache
TEST_PROGRAMS_NEED_X += test-line-buffer
TEST_PROGRAMS_NEED_X += test-parse-options
TEST_PROGRAMS_NEED_X += test-write-cache
-TEST_PROGRAMS_NEED_X += test-regex
TEST_PROGRAMS_NEED_X += test-revision-walking
TEST_PROGRAMS_NEED_X += test-run-command
TEST_PROGRAMS_NEED_X += test-scrap-cache-tree
TEST_PROGRAMS_NEED_X += test-revision-walking
TEST_PROGRAMS_NEED_X += test-run-command
TEST_PROGRAMS_NEED_X += test-scrap-cache-tree
diff --git
a/t/helper/test-regex.c
b/t/helper/test-regex.c
index b5ea8a97c54e1737d91dec894c1cc02e1baf64e5..10284cc56fa9f69703aa69f242edef113d6a40de 100644
(file)
--- 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"
#include "git-compat-util.h"
#include "gettext.h"
@@
-36,7
+37,7
@@
static int test_regex_bug(void)
return 0;
}
return 0;
}
-int cmd_
main
(int argc, const char **argv)
+int cmd_
_regex
(int argc, const char **argv)
{
const char *pat;
const char *str;
{
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)
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++;
argv++;
pat = *argv++;
diff --git
a/t/helper/test-tool.c
b/t/helper/test-tool.c
index 706f88c482caa93cace6075541b78ffb31f94648..37f17334dc640060d11dcb4e8604b12298640b0b 100644
(file)
--- 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 },
{ "prio-queue", cmd__prio_queue },
{ "read-cache", cmd__read_cache },
{ "ref-store", cmd__ref_store },
+ { "regex", cmd__regex },
{ "sha1", cmd__sha1 },
};
{ "sha1", cmd__sha1 },
};
diff --git
a/t/helper/test-tool.h
b/t/helper/test-tool.h
index 2b5cc6e11703bf3daac4b5e716851f9e90a6fbbb..5f73c83ac002f3a22b9d70ad1c16dc32fe3fd11c 100644
(file)
--- 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__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
int cmd__sha1(int argc, const char **argv);
#endif
diff --git
a/t/t0070-fundamental.sh
b/t/t0070-fundamental.sh
index ac007938ee9b0fc58266862c574fa9245a18d93e..23fbe6434abd3f05057d4916f70e5d5b30115b68 100755
(executable)
--- a/
t/t0070-fundamental.sh
+++ b/
t/t0070-fundamental.sh
@@
-31,7
+31,7
@@
test_expect_success 'git_mkstemps_mode does not fail if fd 0 is not open' '
test_expect_success 'check for a bug in the regex routines' '
# if this test fails, re-build git with NO_REGEX=1
test_expect_success 'check for a bug in the regex routines' '
# if this test fails, re-build git with NO_REGEX=1
- test-regex --bug
+ test-
tool
regex --bug
'
test_done
'
test_done
diff --git
a/t/t7812-grep-icase-non-ascii.sh
b/t/t7812-grep-icase-non-ascii.sh
index 0059a1f837882c504e717135c9c92bc5b1d7f62c..0c685d35986eebf4dd72861b650c82fb6b515b51 100755
(executable)
--- a/
t/t7812-grep-icase-non-ascii.sh
+++ b/
t/t7812-grep-icase-non-ascii.sh
@@
-12,7
+12,7
@@
test_expect_success GETTEXT_LOCALE 'setup' '
'
test_have_prereq GETTEXT_LOCALE &&
'
test_have_prereq GETTEXT_LOCALE &&
-test-regex "HALLÓ" "Halló" ICASE &&
+test-
tool
regex "HALLÓ" "Halló" ICASE &&
test_set_prereq REGEX_LOCALE
test_expect_success REGEX_LOCALE 'grep literal string, no -F' '
test_set_prereq REGEX_LOCALE
test_expect_success REGEX_LOCALE 'grep literal string, no -F' '