Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]>
---
Makefile | 2 +-
t/helper/test-example-decorate.c | 3 ++-
t/helper/test-tool.c | 1 +
t/helper/test-tool.h | 1 +
t/t9004-example.sh | 2 +-
5 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 8993cec274..895b170fe3 100644
--- a/Makefile
+++ b/Makefile
@@ -660,12 +660,12 @@ TEST_BUILTINS_OBJS += test-delta.o
TEST_BUILTINS_OBJS += test-drop-caches.o
TEST_BUILTINS_OBJS += test-dump-cache-tree.o
TEST_BUILTINS_OBJS += test-dump-split-index.o
+TEST_BUILTINS_OBJS += test-example-decorate.o
TEST_BUILTINS_OBJS += test-lazy-init-name-hash.o
TEST_BUILTINS_OBJS += test-sha1.o
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
-TEST_PROGRAMS_NEED_X += test-example-decorate
TEST_PROGRAMS_NEED_X += test-fake-ssh
TEST_PROGRAMS_NEED_X += test-genrandom
TEST_PROGRAMS_NEED_X += test-hashmap
diff --git a/t/helper/test-example-decorate.c b/t/helper/test-example-decorate.c
index 90dc97a9d0..280b5a8fbe 100644
--- a/t/helper/test-example-decorate.c
+++ b/t/helper/test-example-decorate.c
@@ -1,8 +1,9 @@
+#include "test-tool.h"
#include "cache.h"
#include "object.h"
#include "decorate.h"
-int cmd_main(int argc, const char **argv)
+int test_example_decorate(int argc, const char **argv)
{
struct decoration n;
struct object_id one_oid = { {1} };
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index 9be6ec3764..92e6f0d5b4 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c
@@ -15,6 +15,7 @@ static struct test_cmd cmds[] = {
{ "drop-caches", test_drop_caches },
{ "dump-cache-tree", test_dump_cache_tree },
{ "dump-split-index", test_dump_split_index },
+ { "example-decorate", test_example_decorate },
{ "lazy-init-name-hash", test_lazy_init_name_hash },
{ "sha1", test_sha1 },
};
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index d062bad365..e97d6c4aaa 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h
@@ -9,6 +9,7 @@ int test_delta(int argc, const char **argv);
int test_drop_caches(int argc, const char **argv);
int test_dump_cache_tree(int argc, const char **argv);
int test_dump_split_index(int argc, const char **argv);
+int test_example_decorate(int argc, const char **argv);
int test_lazy_init_name_hash(int argc, const char **argv);
int test_sha1(int argc, const char **argv);
diff --git a/t/t9004-example.sh b/t/t9004-example.sh
index b28a028f55..7e8894a4a7 100755
--- a/t/t9004-example.sh
+++ b/t/t9004-example.sh
@@ -4,7 +4,7 @@ test_description='check that example code compiles and runs'
. ./test-lib.sh
test_expect_success 'decorate' '
- test-example-decorate
+ test-tool example-decorate
'
test_done
--
2.16.2.903.gd04caf5039