aboutsummaryrefslogtreecommitdiffstats
path: root/t/helper
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-03-24 08:44:42 +0100
committerJunio C Hamano <gitster@pobox.com>2018-03-27 08:45:47 -0700
commitc680668d1aa6abf7e970355428838f8dc0ca4c1c (patch)
tree63da49632b1bc2561bf6efff13e8bca626a9cae0 /t/helper
parentdbceb3ecc5488408069283bbd091b2af9a1560df (diff)
downloadgit-c680668d1aa6abf7e970355428838f8dc0ca4c1c.tar.gz
t/helper: merge test-genrandom 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>
Diffstat (limited to 't/helper')
-rw-r--r--t/helper/test-genrandom.c3
-rw-r--r--t/helper/test-tool.c1
-rw-r--r--t/helper/test-tool.h1
3 files changed, 4 insertions, 1 deletions
diff --git a/t/helper/test-genrandom.c b/t/helper/test-genrandom.c
index 8d11d22d98..99b8dc1e2d 100644
--- a/t/helper/test-genrandom.c
+++ b/t/helper/test-genrandom.c
@@ -4,9 +4,10 @@
* Copyright (C) 2007 by Nicolas Pitre, licensed under the GPL version 2.
*/
+#include "test-tool.h"
#include "git-compat-util.h"
-int cmd_main(int argc, const char **argv)
+int cmd__genrandom(int argc, const char **argv)
{
unsigned long count, next = 0;
unsigned char *c;
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index 55799069cc..f52cbcfe67 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c
@@ -16,6 +16,7 @@ static struct test_cmd cmds[] = {
{ "dump-cache-tree", cmd__dump_cache_tree },
{ "dump-split-index", cmd__dump_split_index },
{ "example-decorate", cmd__example_decorate },
+ { "genrandom", cmd__genrandom },
{ "lazy-init-name-hash", cmd__lazy_init_name_hash },
{ "sha1", cmd__sha1 },
};
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index 721a1e1b09..f7ec6ae0c3 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h
@@ -10,6 +10,7 @@ int cmd__drop_caches(int argc, const char **argv);
int cmd__dump_cache_tree(int argc, const char **argv);
int cmd__dump_split_index(int argc, const char **argv);
int cmd__example_decorate(int argc, const char **argv);
+int cmd__genrandom(int argc, const char **argv);
int cmd__lazy_init_name_hash(int argc, const char **argv);
int cmd__sha1(int argc, const char **argv);