зеркало из https://github.com/microsoft/git.git
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>
This commit is contained in:
Родитель
0e2678af4c
Коммит
e499894443
2
Makefile
2
Makefile
|
@ -654,10 +654,10 @@ PROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS))
|
|||
|
||||
TEST_BUILTINS_OBJS += test-chmtime.o
|
||||
TEST_BUILTINS_OBJS += test-config.o
|
||||
TEST_BUILTINS_OBJS += test-ctype.o
|
||||
TEST_BUILTINS_OBJS += test-lazy-init-name-hash.o
|
||||
TEST_BUILTINS_OBJS += test-sha1.o
|
||||
|
||||
TEST_PROGRAMS_NEED_X += test-ctype
|
||||
TEST_PROGRAMS_NEED_X += test-date
|
||||
TEST_PROGRAMS_NEED_X += test-delta
|
||||
TEST_PROGRAMS_NEED_X += test-drop-caches
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include "test-tool.h"
|
||||
#include "cache.h"
|
||||
|
||||
static int rc;
|
||||
|
@ -28,7 +29,7 @@ static int is_in(const char *s, int ch)
|
|||
#define LOWER "abcdefghijklmnopqrstuvwxyz"
|
||||
#define UPPER "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
|
||||
int cmd_main(int argc, const char **argv)
|
||||
int cmd__ctype(int argc, const char **argv)
|
||||
{
|
||||
TEST_CLASS(isdigit, DIGIT);
|
||||
TEST_CLASS(isspace, " \n\r\t");
|
||||
|
|
|
@ -9,6 +9,7 @@ struct test_cmd {
|
|||
static struct test_cmd cmds[] = {
|
||||
{ "chmtime", cmd__chmtime },
|
||||
{ "config", cmd__config },
|
||||
{ "ctype", cmd__ctype },
|
||||
{ "lazy-init-name-hash", cmd__lazy_init_name_hash },
|
||||
{ "sha1", cmd__sha1 },
|
||||
};
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
int cmd__chmtime(int argc, const char **argv);
|
||||
int cmd__config(int argc, const char **argv);
|
||||
int cmd__ctype(int argc, const char **argv);
|
||||
int cmd__lazy_init_name_hash(int argc, const char **argv);
|
||||
int cmd__sha1(int argc, const char **argv);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ Verify wrappers and compatibility functions.
|
|||
. ./test-lib.sh
|
||||
|
||||
test_expect_success 'character classes (isspace, isalpha etc.)' '
|
||||
test-ctype
|
||||
test-tool ctype
|
||||
'
|
||||
|
||||
test_expect_success 'mktemp to nonexistent directory prints filename' '
|
||||
|
|
Загрузка…
Ссылка в новой задаче