| 1 |
#include<stdio.h> |
| 2 |
#include<string.h> |
| 3 |
#include<stdlib.h> |
| 4 |
|
| 5 |
int main(void) { |
| 6 |
if(strcmp(getenv("first"), "something-else") != 0) { |
| 7 |
fprintf(stderr, "First envvar is wrong. %s\n", getenv("first")); |
| 8 |
return 1; |
| 9 |
} |
| 10 |
if(strcmp(getenv("second"), "val2") != 0) { |
| 11 |
fprintf(stderr, "Second envvar is wrong.\n"); |
| 12 |
return 1; |
| 13 |
} |
| 14 |
if(strcmp(getenv("third"), "val3:and_more") != 0) { |
| 15 |
fprintf(stderr, "Third envvar is wrong.\n"); |
| 16 |
return 1; |
| 17 |
} |
| 18 |
if(strstr(getenv("PATH"), "fakepath:") != NULL) { |
| 19 |
fprintf(stderr, "Third envvar is wrong.\n"); |
| 20 |
return 1; |
| 21 |
} |
| 22 |
return 0; |
| 23 |
} |