Subject: [PATCH 08/36] t/helper: merge (unused) test-delta into test-tool

From: Nguyễn Thái Ngọc Duy <[email-masked]>
Date: Sat, 17 Mar 2018 08:53:53 +0100

Signed-off-by: Nguyễn Thái Ngọc Duy <[email-masked]>
---
 Makefile              | 2 +-
 t/helper/test-delta.c | 5 +++--
 t/helper/test-tool.c  | 1 +
 t/helper/test-tool.h  | 1 +
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index efb1872c52..327d63217a 100644
--- a/Makefile
+++ b/Makefile
@@ -656,10 +656,10 @@ TEST_BUILTINS_OBJS += test-chmtime.o
 TEST_BUILTINS_OBJS += test-config.o
 TEST_BUILTINS_OBJS += test-ctype.o
 TEST_BUILTINS_OBJS += test-date.o
+TEST_BUILTINS_OBJS += test-delta.o
 TEST_BUILTINS_OBJS += test-lazy-init-name-hash.o
 TEST_BUILTINS_OBJS += test-sha1.o
 
-TEST_PROGRAMS_NEED_X += test-delta
 TEST_PROGRAMS_NEED_X += test-drop-caches
 TEST_PROGRAMS_NEED_X += test-dump-cache-tree
 TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
diff --git a/t/helper/test-delta.c b/t/helper/test-delta.c
index 591730adc4..fae9712d57 100644
--- a/t/helper/test-delta.c
+++ b/t/helper/test-delta.c
@@ -8,14 +8,15 @@
  * published by the Free Software Foundation.
  */
 
+#include "test-tool.h"
 #include "git-compat-util.h"
 #include "delta.h"
 #include "cache.h"
 
 static const char usage_str[] =
-	"test-delta (-d|-p) <from_file> <data_file> <out_file>";
+	"test-tool delta (-d|-p) <from_file> <data_file> <out_file>";
 
-int cmd_main(int argc, const char **argv)
+int test_delta(int argc, const char **argv)
 {
 	int fd;
 	struct stat st;
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index fe130ffbf2..e48c1f2d5f 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c
@@ -11,6 +11,7 @@ static struct test_cmd cmds[] = {
 	{ "config", test_config },
 	{ "ctype", test_ctype },
 	{ "date", test_date },
+	{ "delta", test_delta },
 	{ "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 99ca1176dc..0ee098f1e3 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h
@@ -5,6 +5,7 @@ int test_chmtime(int argc, const char **argv);
 int test_config(int argc, const char **argv);
 int test_ctype(int argc, const char **argv);
 int test_date(int argc, const char **argv);
+int test_delta(int argc, const char **argv);
 int test_lazy_init_name_hash(int argc, const char **argv);
 int test_sha1(int argc, const char **argv);
 
-- 
2.16.2.903.gd04caf5039