Git 2.44-rc2
[git/gitster.git] / t / helper / test-getcwd.c
blobd680038a780079db9abadc5fe95967aebd43abc8
1 #include "test-tool.h"
2 #include "git-compat-util.h"
3 #include "parse-options.h"
5 static const char *getcwd_usage[] = {
6 "test-tool getcwd",
7 NULL
8 };
10 int cmd__getcwd(int argc, const char **argv)
12 struct option options[] = {
13 OPT_END()
15 char *cwd;
17 argc = parse_options(argc, argv, "test-tools", options, getcwd_usage, 0);
18 if (argc > 0)
19 usage_with_options(getcwd_usage, options);
21 cwd = xgetcwd();
22 puts(cwd);
23 free(cwd);
25 return 0;