diff --git a/src/regression/execle-env.c b/src/regression/execle-env.c new file mode 100644 index 0000000..d3a8b4e --- /dev/null +++ b/src/regression/execle-env.c @@ -0,0 +1,17 @@ +// execle should pass env properly +#include +#include +#include +#include "test.h" + +int main(void) +{ + char *env[] = {"VAR=abc", 0}; + + execle("/bin/sh", "sh", "-c", + "[ \"$VAR\" = abc ] || { echo '"__FILE__": env is not passed'; exit 1; }", + (char*)0, env); + + t_error("execle failed: %s\n", strerror(errno)); + return 1; +}