Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / test / make-binary-wrapper / invalid-env.c
blob4dfd36fb68a0b909514d9210e89633aaec657eac
1 #include <unistd.h>
2 #include <stdlib.h>
3 #include <stdio.h>
5 #define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0)
7 int main(int argc, char **argv) {
8 putenv("==TEST1");
9 #error Illegal environment variable name `=` (cannot contain `=`)
10 assert_success(setenv("", "TEST2", 0));
11 #error Environment variable name can't be empty.
12 argv[0] = "/send/me/flags";
13 return execv("/send/me/flags", argv);