2005-02-23 03:42:55 +01:00
|
|
|
#include <errno.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
static int
|
|
|
|
do_test (void)
|
|
|
|
{
|
|
|
|
static const char prog[] = "does-not-exist";
|
2005-12-27 23:49:45 +01:00
|
|
|
const char *env [] = {"FOO=BAR", NULL};
|
2005-02-23 03:42:55 +01:00
|
|
|
errno = 0;
|
2005-03-30 01:27:01 +02:00
|
|
|
execle (prog, prog, NULL, env);
|
2005-02-23 03:42:55 +01:00
|
|
|
|
|
|
|
if (errno != ENOENT)
|
|
|
|
{
|
|
|
|
printf ("errno = %d (%m), expected ENOENT\n", errno);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
#define TEST_FUNCTION do_test ()
|
|
|
|
#include "../test-skeleton.c"
|