t/helper: merge (unused) test-mergesort 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 34889d3cd7e431597a6a93f26f14a81a61b7d603
4 files changed +5 -2
Makefile
+1 -1
@@ -666,13 +666,13 @@ TEST_BUILTINS_OBJS += test-hashmap.o
666 TEST_BUILTINS_OBJS += test-index-version.o
667 TEST_BUILTINS_OBJS += test-lazy-init-name-hash.o
668 TEST_BUILTINS_OBJS += test-match-trees.o
669 +TEST_BUILTINS_OBJS += test-mergesort.o
670 TEST_BUILTINS_OBJS += test-sha1.o
671
672 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
673 TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
674 TEST_PROGRAMS_NEED_X += test-fake-ssh
675 TEST_PROGRAMS_NEED_X += test-line-buffer
675 -TEST_PROGRAMS_NEED_X += test-mergesort
676 TEST_PROGRAMS_NEED_X += test-mktemp
677 TEST_PROGRAMS_NEED_X += test-online-cpus
678 TEST_PROGRAMS_NEED_X += test-parse-options
t/helper/test-mergesort.c
+2 -1
@@ -1,3 +1,4 @@
1 +#include "test-tool.h"
2 #include "cache.h"
3 #include "mergesort.h"
4
@@ -22,7 +23,7 @@ static int compare_strings(const void *a, const void *b)
23 return strcmp(x->text, y->text);
24 }
25
25 -int cmd_main(int argc, const char **argv)
26 +int cmd__mergesort(int argc, const char **argv)
27 {
28 struct line *line, *p = NULL, *lines = NULL;
29 struct strbuf sb = STRBUF_INIT;
t/helper/test-tool.c
+1
@@ -21,6 +21,7 @@ static struct test_cmd cmds[] = {
21 { "index-version", cmd__index_version },
22 { "lazy-init-name-hash", cmd__lazy_init_name_hash },
23 { "match-trees", cmd__match_trees },
24 + { "mergesort", cmd__mergesort },
25 { "sha1", cmd__sha1 },
26 };
27
t/helper/test-tool.h
+1
@@ -15,6 +15,7 @@ int cmd__hashmap(int argc, const char **argv);
15 int cmd__index_version(int argc, const char **argv);
16 int cmd__lazy_init_name_hash(int argc, const char **argv);
17 int cmd__match_trees(int argc, const char **argv);
18 +int cmd__mergesort(int argc, const char **argv);
19 int cmd__sha1(int argc, const char **argv);
20
21 #endif