Skip to content

Commit

Permalink
Use a modern terminal in pick-test
Browse files Browse the repository at this point in the history
Also, overwrite any existing value for the mandatory environment
variables. This is of important in order make the test environment
consistent.
  • Loading branch information
mptre committed Jun 26, 2017
1 parent b8857fd commit 1ee1a1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/pick-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static char **pickargv;
static const char *pickenv[] = {
"LC_CTYPE", "en_US.UTF-8",
"MALLOC_OPTIONS", "S", /* malloc.conf(5) options on OpenBSD */
"TERM", "vt100",
"TERM", "xterm",
NULL,
};
static int gotsig;
Expand Down Expand Up @@ -173,7 +173,7 @@ child(int master, int slave)
err(1, "TIOCSWINSZ");

for (env = pickenv; *env != NULL; env += 2)
if (setenv(env[0], env[1], 0) == -1)
if (setenv(env[0], env[1], 1) == -1)
err(1, "setenv: %s", env[0]);

execv(pickargv[0], pickargv);
Expand Down

0 comments on commit 1ee1a1d

Please sign in to comment.