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>
Nguyễn Thái Ngọc Duy committed
Mar 24, 2018 at 08:44 UTC
1a5f3d702235d42c22853ea3fe15949caa4c41ed
5 files changed
+6
-3
Makefile
+1
-1
@@ -680,6 +680,7 @@ TEST_BUILTINS_OBJS += test-scrap-cache-tree.o
680
TEST_BUILTINS_OBJS += test-sha1-array.o
681
TEST_BUILTINS_OBJS += test-sha1.o
682
TEST_BUILTINS_OBJS += test-sigchain.o
683
+TEST_BUILTINS_OBJS += test-strcmp-offset.o
684
685
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
686
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
@@ -687,7 +688,6 @@ TEST_PROGRAMS_NEED_X += test-fake-ssh
688
TEST_PROGRAMS_NEED_X += test-line-buffer
689
TEST_PROGRAMS_NEED_X += test-parse-options
690
TEST_PROGRAMS_NEED_X += test-write-cache
690
-TEST_PROGRAMS_NEED_X += test-strcmp-offset
691
TEST_PROGRAMS_NEED_X += test-string-list
692
TEST_PROGRAMS_NEED_X += test-submodule-config
693
TEST_PROGRAMS_NEED_X += test-subprocess
t/helper/test-strcmp-offset.c
+2
-1
@@ -1,6 +1,7 @@
1
+#include "test-tool.h"
2
#include "cache.h"
3
3
-int cmd_main(int argc, const char **argv)
4
+int cmd__strcmp_offset(int argc, const char **argv)
5
{
6
int result;
7
size_t offset;
t/helper/test-tool.c
+1
@@ -35,6 +35,7 @@ static struct test_cmd cmds[] = {
35
{ "sha1-array", cmd__sha1_array },
36
{ "sha1", cmd__sha1 },
37
{ "sigchain", cmd__sigchain },
38
+ { "strcmp-offset", cmd__strcmp_offset },
39
};
40
41
int cmd_main(int argc, const char **argv)
t/helper/test-tool.h
+1
@@ -29,5 +29,6 @@ int cmd__scrap_cache_tree(int argc, const char **argv);
29
int cmd__sha1_array(int argc, const char **argv);
30
int cmd__sha1(int argc, const char **argv);
31
int cmd__sigchain(int argc, const char **argv);
32
+int cmd__strcmp_offset(int argc, const char **argv);
33
34
#endif
t/t0065-strcmp-offset.sh
+1
-1
@@ -8,7 +8,7 @@ while read s1 s2 expect
8
do
9
test_expect_success "strcmp_offset($s1, $s2)" '
10
echo "$expect" >expect &&
11
- test-strcmp-offset "$s1" "$s2" >actual &&
11
+ test-tool strcmp-offset "$s1" "$s2" >actual &&
12
test_cmp expect actual
13
'
14
done <<-EOF