2 * test-run-command.c: test run command API.
4 * (C) 2009 Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
6 * This code is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
11 #include "git-compat-util.h"
12 #include "run-command.h"
16 int main(int argc
, char **argv
)
18 struct child_process proc
;
20 memset(&proc
, 0, sizeof(proc
));
24 proc
.argv
= (const char **)argv
+2;
26 if (!strcmp(argv
[1], "start-command-ENOENT")) {
27 if (start_command(&proc
) < 0 && errno
== ENOENT
)
29 fprintf(stderr
, "FAIL %s\n", argv
[1]);
33 fprintf(stderr
, "check usage\n");