t/helper: merge test-parse-options 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>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2018-09-09 19:36:29 +02:00
committed by Junio C Hamano
parent 8ea40cc55d
commit 2f17c78ceb
5 changed files with 41 additions and 38 deletions

View File

@ -1,3 +1,4 @@
#include "test-tool.h"
#include "cache.h"
#include "parse-options.h"
#include "string-list.h"
@ -94,11 +95,11 @@ static void show(struct string_list *expect, int *status, const char *fmt, ...)
strbuf_release(&buf);
}
int cmd_main(int argc, const char **argv)
int cmd__parse_options(int argc, const char **argv)
{
const char *prefix = "prefix/";
const char *usage[] = {
"test-parse-options <options>",
"test-tool parse-options <options>",
"",
"A helper function for the parse-options API.",
NULL