1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-07 06:56:08 +02:00

t/helper: merge test-strcmp-offset 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:59 +01:00 committed by Junio C Hamano
parent e154a6f3de
commit 1a5f3d7022
5 changed files with 6 additions and 3 deletions

View File

@ -680,6 +680,7 @@ TEST_BUILTINS_OBJS += test-scrap-cache-tree.o
TEST_BUILTINS_OBJS += test-sha1-array.o
TEST_BUILTINS_OBJS += test-sha1.o
TEST_BUILTINS_OBJS += test-sigchain.o
TEST_BUILTINS_OBJS += test-strcmp-offset.o
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
@ -687,7 +688,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-strcmp-offset
TEST_PROGRAMS_NEED_X += test-string-list
TEST_PROGRAMS_NEED_X += test-submodule-config
TEST_PROGRAMS_NEED_X += test-subprocess

View File

@ -1,6 +1,7 @@
#include "test-tool.h"
#include "cache.h"
int cmd_main(int argc, const char **argv)
int cmd__strcmp_offset(int argc, const char **argv)
{
int result;
size_t offset;

View File

@ -35,6 +35,7 @@ static struct test_cmd cmds[] = {
{ "sha1-array", cmd__sha1_array },
{ "sha1", cmd__sha1 },
{ "sigchain", cmd__sigchain },
{ "strcmp-offset", cmd__strcmp_offset },
};
int cmd_main(int argc, const char **argv)

View File

@ -29,5 +29,6 @@ int cmd__scrap_cache_tree(int argc, const char **argv);
int cmd__sha1_array(int argc, const char **argv);
int cmd__sha1(int argc, const char **argv);
int cmd__sigchain(int argc, const char **argv);
int cmd__strcmp_offset(int argc, const char **argv);
#endif

View File

@ -8,7 +8,7 @@ while read s1 s2 expect
do
test_expect_success "strcmp_offset($s1, $s2)" '
echo "$expect" >expect &&
test-strcmp-offset "$s1" "$s2" >actual &&
test-tool strcmp-offset "$s1" "$s2" >actual &&
test_cmp expect actual
'
done <<-EOF