t/helper: merge test-ctype 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>
Nguyễn Thái Ngọc Duy committed
Mar 24, 2018 at 08:44 UTC
e499894443d53bc9259daa592adb6a47cf215fef
5 files changed
+6
-3
Makefile
+1
-1
@@ -654,10 +654,10 @@ PROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS))
654
655
TEST_BUILTINS_OBJS += test-chmtime.o
656
TEST_BUILTINS_OBJS += test-config.o
657
+TEST_BUILTINS_OBJS += test-ctype.o
658
TEST_BUILTINS_OBJS += test-lazy-init-name-hash.o
659
TEST_BUILTINS_OBJS += test-sha1.o
660
660
-TEST_PROGRAMS_NEED_X += test-ctype
661
TEST_PROGRAMS_NEED_X += test-date
662
TEST_PROGRAMS_NEED_X += test-delta
663
TEST_PROGRAMS_NEED_X += test-drop-caches
t/helper/test-ctype.c
+2
-1
@@ -1,3 +1,4 @@
1
+#include "test-tool.h"
2
#include "cache.h"
3
4
static int rc;
@@ -28,7 +29,7 @@ static int is_in(const char *s, int ch)
29
#define LOWER "abcdefghijklmnopqrstuvwxyz"
30
#define UPPER "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
31
31
-int cmd_main(int argc, const char **argv)
32
+int cmd__ctype(int argc, const char **argv)
33
{
34
TEST_CLASS(isdigit, DIGIT);
35
TEST_CLASS(isspace, " \n\r\t");
t/helper/test-tool.c
+1
@@ -9,6 +9,7 @@ struct test_cmd {
9
static struct test_cmd cmds[] = {
10
{ "chmtime", cmd__chmtime },
11
{ "config", cmd__config },
12
+ { "ctype", cmd__ctype },
13
{ "lazy-init-name-hash", cmd__lazy_init_name_hash },
14
{ "sha1", cmd__sha1 },
15
};
t/helper/test-tool.h
+1
@@ -3,6 +3,7 @@
3
4
int cmd__chmtime(int argc, const char **argv);
5
int cmd__config(int argc, const char **argv);
6
+int cmd__ctype(int argc, const char **argv);
7
int cmd__lazy_init_name_hash(int argc, const char **argv);
8
int cmd__sha1(int argc, const char **argv);
9
t/t0070-fundamental.sh
+1
-1
@@ -9,7 +9,7 @@ Verify wrappers and compatibility functions.
9
. ./test-lib.sh
10
11
test_expect_success 'character classes (isspace, isalpha etc.)' '
12
- test-ctype
12
+ test-tool ctype
13
'
14
15
test_expect_success 'mktemp to nonexistent directory prints filename' '