diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-03-24 08:44:36 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-27 08:45:47 -0700 |
commit | a801a7cfc7c009c11941d497e2d689164e4845f6 (patch) | |
tree | 9596a054d326b94cfbc3d75b98470ae1c966f467 /t/helper | |
parent | t/helper: merge test-ctype into test-tool (diff) | |
download | tgif-a801a7cfc7c009c11941d497e2d689164e4845f6.tar.xz |
t/helper: merge test-date 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-date.c | 17 | ||||
-rw-r--r-- | t/helper/test-tool.c | 1 | ||||
-rw-r--r-- | t/helper/test-tool.h | 1 |
3 files changed, 11 insertions, 8 deletions
diff --git a/t/helper/test-date.c b/t/helper/test-date.c index ac83687970..a0837371ab 100644 --- a/t/helper/test-date.c +++ b/t/helper/test-date.c @@ -1,13 +1,14 @@ +#include "test-tool.h" #include "cache.h" static const char *usage_msg = "\n" -" test-date relative [time_t]...\n" -" test-date show:<format> [time_t]...\n" -" test-date parse [date]...\n" -" test-date approxidate [date]...\n" -" test-date timestamp [date]...\n" -" test-date is64bit\n" -" test-date time_t-is64bit\n"; +" test-tool date relative [time_t]...\n" +" test-tool date show:<format> [time_t]...\n" +" test-tool date parse [date]...\n" +" test-tool date approxidate [date]...\n" +" test-tool date timestamp [date]...\n" +" test-tool date is64bit\n" +" test-tool date time_t-is64bit\n"; static void show_relative_dates(const char **argv, struct timeval *now) { @@ -81,7 +82,7 @@ static void parse_approx_timestamp(const char **argv, struct timeval *now) } } -int cmd_main(int argc, const char **argv) +int cmd__date(int argc, const char **argv) { struct timeval now; const char *x; diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c index a1999495a6..cae060d492 100644 --- a/t/helper/test-tool.c +++ b/t/helper/test-tool.c @@ -10,6 +10,7 @@ static struct test_cmd cmds[] = { { "chmtime", cmd__chmtime }, { "config", cmd__config }, { "ctype", cmd__ctype }, + { "date", cmd__date }, { "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 41805ecd1c..31c20bb656 100644 --- a/t/helper/test-tool.h +++ b/t/helper/test-tool.h @@ -4,6 +4,7 @@ int cmd__chmtime(int argc, const char **argv); int cmd__config(int argc, const char **argv); int cmd__ctype(int argc, const char **argv); +int cmd__date(int argc, const char **argv); int cmd__lazy_init_name_hash(int argc, const char **argv); int cmd__sha1(int argc, const char **argv); |