Skip to content

Commit 1a5f3d7

Browse files
pcloudsgitster
authored andcommitted
t/helper: merge test-strcmp-offset into test-tool
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e154a6f commit 1a5f3d7

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,14 +680,14 @@ TEST_BUILTINS_OBJS += test-scrap-cache-tree.o
680680
TEST_BUILTINS_OBJS += test-sha1-array.o
681681
TEST_BUILTINS_OBJS += test-sha1.o
682682
TEST_BUILTINS_OBJS += test-sigchain.o
683+
TEST_BUILTINS_OBJS += test-strcmp-offset.o
683684

684685
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
685686
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
686687
TEST_PROGRAMS_NEED_X += test-fake-ssh
687688
TEST_PROGRAMS_NEED_X += test-line-buffer
688689
TEST_PROGRAMS_NEED_X += test-parse-options
689690
TEST_PROGRAMS_NEED_X += test-write-cache
690-
TEST_PROGRAMS_NEED_X += test-strcmp-offset
691691
TEST_PROGRAMS_NEED_X += test-string-list
692692
TEST_PROGRAMS_NEED_X += test-submodule-config
693693
TEST_PROGRAMS_NEED_X += test-subprocess

t/helper/test-strcmp-offset.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
#include "test-tool.h"
12
#include "cache.h"
23

3-
int cmd_main(int argc, const char **argv)
4+
int cmd__strcmp_offset(int argc, const char **argv)
45
{
56
int result;
67
size_t offset;

t/helper/test-tool.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ static struct test_cmd cmds[] = {
3535
{ "sha1-array", cmd__sha1_array },
3636
{ "sha1", cmd__sha1 },
3737
{ "sigchain", cmd__sigchain },
38+
{ "strcmp-offset", cmd__strcmp_offset },
3839
};
3940

4041
int cmd_main(int argc, const char **argv)

t/helper/test-tool.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ int cmd__scrap_cache_tree(int argc, const char **argv);
2929
int cmd__sha1_array(int argc, const char **argv);
3030
int cmd__sha1(int argc, const char **argv);
3131
int cmd__sigchain(int argc, const char **argv);
32+
int cmd__strcmp_offset(int argc, const char **argv);
3233

3334
#endif

t/t0065-strcmp-offset.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ while read s1 s2 expect
88
do
99
test_expect_success "strcmp_offset($s1, $s2)" '
1010
echo "$expect" >expect &&
11-
test-strcmp-offset "$s1" "$s2" >actual &&
11+
test-tool strcmp-offset "$s1" "$s2" >actual &&
1212
test_cmp expect actual
1313
'
1414
done <<-EOF

0 commit comments

Comments
 (0)