1 #include "git-compat-util.h"
6 int (*fn
)(int argc
, const char **argv
);
9 static struct test_cmd cmds
[] = {
12 int cmd_main(int argc
, const char **argv
)
17 die("I need a test name!");
19 for (i
= 0; i
< ARRAY_SIZE(cmds
); i
++) {
20 if (!strcmp(cmds
[i
].name
, argv
[1])) {
23 return cmds
[i
].fn(argc
, argv
);
26 die("There is no test named '%s'", argv
[1]);