Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Updated test code to use SDL_setenv()
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 17, 2009
1 parent 75053a8 commit 362ec6f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/stdlib/SDL_getenv.c
Expand Up @@ -214,7 +214,7 @@ main(int argc, char *argv[])
}
printf("Setting FIRST=VALUE1 in the environment... ");
fflush(stdout);
if (SDL_putenv("FIRST=VALUE1") == 0) {
if (SDL_setenv("FIRST", "VALUE1", 0) == 0) {
printf("okay\n");
} else {
printf("failed\n");
Expand All @@ -229,7 +229,7 @@ main(int argc, char *argv[])
}
printf("Setting SECOND=VALUE2 in the environment... ");
fflush(stdout);
if (SDL_putenv("SECOND=VALUE2") == 0) {
if (SDL_setenv("SECOND", "VALUE2", 0) == 0) {
printf("okay\n");
} else {
printf("failed\n");
Expand All @@ -244,7 +244,7 @@ main(int argc, char *argv[])
}
printf("Setting FIRST=NOVALUE in the environment... ");
fflush(stdout);
if (SDL_putenv("FIRST=NOVALUE") == 0) {
if (SDL_setenv("FIRST", "NOVALUE", 1) == 0) {
printf("okay\n");
} else {
printf("failed\n");
Expand All @@ -267,4 +267,5 @@ main(int argc, char *argv[])
return (0);
}
#endif /* TEST_MAIN */

/* vi: set ts=4 sw=4 expandtab: */

0 comments on commit 362ec6f

Please sign in to comment.