Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com>
---
 Makefile                  | 2 +-
 t/helper/test-mergesort.c | 3 ++-
 t/helper/test-tool.c      | 1 +
 t/helper/test-tool.h      | 1 +
 4 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 6552a8f4ed..67f37b849e 100644
--- a/Makefile
+++ b/Makefile
@@ -666,13 +666,13 @@ TEST_BUILTINS_OBJS += test-hashmap.o
 TEST_BUILTINS_OBJS += test-index-version.o
 TEST_BUILTINS_OBJS += test-lazy-init-name-hash.o
 TEST_BUILTINS_OBJS += test-match-trees.o
+TEST_BUILTINS_OBJS += test-mergesort.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-fake-ssh
 TEST_PROGRAMS_NEED_X += test-line-buffer
-TEST_PROGRAMS_NEED_X += test-mergesort
 TEST_PROGRAMS_NEED_X += test-mktemp
 TEST_PROGRAMS_NEED_X += test-online-cpus
 TEST_PROGRAMS_NEED_X += test-parse-options
diff --git a/t/helper/test-mergesort.c b/t/helper/test-mergesort.c
index 335cf6b626..31258e40d9 100644
--- a/t/helper/test-mergesort.c
+++ b/t/helper/test-mergesort.c
@@ -1,3 +1,4 @@
+#include "test-tool.h"
 #include "cache.h"
 #include "mergesort.h"
 
@@ -22,7 +23,7 @@ static int compare_strings(const void *a, const void *b)
        return strcmp(x->text, y->text);
 }
 
-int cmd_main(int argc, const char **argv)
+int test_mergesort(int argc, const char **argv)
 {
        struct line *line, *p = NULL, *lines = NULL;
        struct strbuf sb = STRBUF_INIT;
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index cde9f16fc8..4206d96304 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c
@@ -21,6 +21,7 @@ static struct test_cmd cmds[] = {
        { "index-version", test_index_version },
        { "lazy-init-name-hash", test_lazy_init_name_hash },
        { "match-trees", test_match_trees },
+       { "mergesort", test_mergesort },
        { "sha1", test_sha1 },
 };
 
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index 937c408dcc..dff1b804cb 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h
@@ -15,6 +15,7 @@ int test_hashmap(int argc, const char **argv);
 int test_index_version(int argc, const char **argv);
 int test_lazy_init_name_hash(int argc, const char **argv);
 int test_match_trees(int argc, const char **argv);
+int test_mergesort(int argc, const char **argv);
 int test_sha1(int argc, const char **argv);
 
 #endif
-- 
2.16.2.903.gd04caf5039

Reply via email to