t/helper: merge test-example-decorate 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
dbceb3ecc5488408069283bbd091b2af9a1560df
5 files changed
+6
-3
Makefile
+1
-1
@@ -660,12 +660,12 @@ TEST_BUILTINS_OBJS += test-delta.o
660
TEST_BUILTINS_OBJS += test-drop-caches.o
661
TEST_BUILTINS_OBJS += test-dump-cache-tree.o
662
TEST_BUILTINS_OBJS += test-dump-split-index.o
663
+TEST_BUILTINS_OBJS += test-example-decorate.o
664
TEST_BUILTINS_OBJS += test-lazy-init-name-hash.o
665
TEST_BUILTINS_OBJS += test-sha1.o
666
667
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
668
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
668
-TEST_PROGRAMS_NEED_X += test-example-decorate
669
TEST_PROGRAMS_NEED_X += test-fake-ssh
670
TEST_PROGRAMS_NEED_X += test-genrandom
671
TEST_PROGRAMS_NEED_X += test-hashmap
t/helper/test-example-decorate.c
+2
-1
@@ -1,8 +1,9 @@
1
+#include "test-tool.h"
2
#include "cache.h"
3
#include "object.h"
4
#include "decorate.h"
5
5
-int cmd_main(int argc, const char **argv)
6
+int cmd__example_decorate(int argc, const char **argv)
7
{
8
struct decoration n;
9
struct object_id one_oid = { {1} };
t/helper/test-tool.c
+1
@@ -15,6 +15,7 @@ static struct test_cmd cmds[] = {
15
{ "drop-caches", cmd__drop_caches },
16
{ "dump-cache-tree", cmd__dump_cache_tree },
17
{ "dump-split-index", cmd__dump_split_index },
18
+ { "example-decorate", cmd__example_decorate },
19
{ "lazy-init-name-hash", cmd__lazy_init_name_hash },
20
{ "sha1", cmd__sha1 },
21
};
t/helper/test-tool.h
+1
@@ -9,6 +9,7 @@ int cmd__delta(int argc, const char **argv);
9
int cmd__drop_caches(int argc, const char **argv);
10
int cmd__dump_cache_tree(int argc, const char **argv);
11
int cmd__dump_split_index(int argc, const char **argv);
12
+int cmd__example_decorate(int argc, const char **argv);
13
int cmd__lazy_init_name_hash(int argc, const char **argv);
14
int cmd__sha1(int argc, const char **argv);
15
t/t9004-example.sh
+1
-1
@@ -4,7 +4,7 @@ test_description='check that example code compiles and runs'
4
. ./test-lib.sh
5
6
test_expect_success 'decorate' '
7
- test-example-decorate
7
+ test-tool example-decorate
8
'
9
10
test_done