Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 't/helper/test-run-command.c')
-rw-r--r--t/helper/test-run-command.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/t/helper/test-run-command.c b/t/helper/test-run-command.c
index 8d3f6d5a5e..67dde56962 100644
--- a/t/helper/test-run-command.c
+++ b/t/helper/test-run-command.c
@@ -31,7 +31,7 @@ static int parallel_next(struct child_process *cp,
if (number_callbacks >= 4)
return 0;
- argv_array_pushv(&cp->args, d->argv);
+ strvec_pushv(&cp->args, d->argv);
strbuf_addstr(err, "preloaded output of a child\n");
number_callbacks++;
return 1;
@@ -72,19 +72,19 @@ static int next_test(struct child_process *cp, struct strbuf *err, void *cb,
return 0;
test = suite->tests.items[suite->next++].string;
- argv_array_pushl(&cp->args, "sh", test, NULL);
+ strvec_pushl(&cp->args, "sh", test, NULL);
if (suite->quiet)
- argv_array_push(&cp->args, "--quiet");
+ strvec_push(&cp->args, "--quiet");
if (suite->immediate)
- argv_array_push(&cp->args, "-i");
+ strvec_push(&cp->args, "-i");
if (suite->verbose)
- argv_array_push(&cp->args, "-v");
+ strvec_push(&cp->args, "-v");
if (suite->verbose_log)
- argv_array_push(&cp->args, "-V");
+ strvec_push(&cp->args, "-V");
if (suite->trace)
- argv_array_push(&cp->args, "-x");
+ strvec_push(&cp->args, "-x");
if (suite->write_junit_xml)
- argv_array_push(&cp->args, "--write-junit-xml");
+ strvec_push(&cp->args, "--write-junit-xml");
strbuf_addf(err, "Output of '%s':\n", test);
*task_cb = (void *)test;
@@ -220,7 +220,7 @@ static int quote_stress_test(int argc, const char **argv)
char special[] = ".?*\\^_\"'`{}()[]<>@~&+:;$%"; // \t\r\n\a";
int i, j, k, trials = 100, skip = 0, msys2 = 0;
struct strbuf out = STRBUF_INIT;
- struct argv_array args = ARGV_ARRAY_INIT;
+ struct strvec args = STRVEC_INIT;
struct option options[] = {
OPT_INTEGER('n', "trials", &trials, "Number of trials"),
OPT_INTEGER('s', "skip", &skip, "Skip <n> trials"),
@@ -241,12 +241,12 @@ static int quote_stress_test(int argc, const char **argv)
size_t arg_count, arg_offset;
int ret = 0;
- argv_array_clear(&args);
+ strvec_clear(&args);
if (msys2)
- argv_array_pushl(&args, "sh", "-c",
+ strvec_pushl(&args, "sh", "-c",
"printf %s\\\\0 \"$@\"", "skip", NULL);
else
- argv_array_pushl(&args, "test-tool", "run-command",
+ strvec_pushl(&args, "test-tool", "run-command",
"quote-echo", NULL);
arg_offset = args.argc;
@@ -254,7 +254,7 @@ static int quote_stress_test(int argc, const char **argv)
trials = 1;
arg_count = argc;
for (j = 0; j < arg_count; j++)
- argv_array_push(&args, argv[j]);
+ strvec_push(&args, argv[j]);
} else {
arg_count = 1 + (my_random() % 5);
for (j = 0; j < arg_count; j++) {
@@ -268,7 +268,7 @@ static int quote_stress_test(int argc, const char **argv)
ARRAY_SIZE(special)];
buf[arg_len] = '\0';
- argv_array_push(&args, buf);
+ strvec_push(&args, buf);
}
}
@@ -301,7 +301,7 @@ static int quote_stress_test(int argc, const char **argv)
(int)j, args.argv[j + arg_offset]);
strbuf_release(&out);
- argv_array_clear(&args);
+ strvec_clear(&args);
return ret;
}
@@ -311,7 +311,7 @@ static int quote_stress_test(int argc, const char **argv)
}
strbuf_release(&out);
- argv_array_clear(&args);
+ strvec_clear(&args);
return 0;
}
@@ -338,7 +338,7 @@ static int inherit_handle(const char *argv0)
xsnprintf(path, sizeof(path), "out-XXXXXX");
tmp = xmkstemp(path);
- argv_array_pushl(&cp.args,
+ strvec_pushl(&cp.args,
"test-tool", argv0, "inherited-handle-child", NULL);
cp.in = -1;
cp.no_stdout = cp.no_stderr = 1;
@@ -391,7 +391,7 @@ int cmd__run_command(int argc, const char **argv)
while (!strcmp(argv[1], "env")) {
if (!argv[2])
die("env specifier without a value");
- argv_array_push(&proc.env_array, argv[2]);
+ strvec_push(&proc.env_array, argv[2]);
argv += 2;
argc -= 2;
}