Commit 0833d1cd authored by Sam Lantinga's avatar Sam Lantinga

Updated test code to use SDL_setenv()

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404340
parent a9012609
...@@ -214,7 +214,7 @@ main(int argc, char *argv[]) ...@@ -214,7 +214,7 @@ main(int argc, char *argv[])
} }
printf("Setting FIRST=VALUE1 in the environment... "); printf("Setting FIRST=VALUE1 in the environment... ");
fflush(stdout); fflush(stdout);
if (SDL_putenv("FIRST=VALUE1") == 0) { if (SDL_setenv("FIRST", "VALUE1", 0) == 0) {
printf("okay\n"); printf("okay\n");
} else { } else {
printf("failed\n"); printf("failed\n");
...@@ -229,7 +229,7 @@ main(int argc, char *argv[]) ...@@ -229,7 +229,7 @@ main(int argc, char *argv[])
} }
printf("Setting SECOND=VALUE2 in the environment... "); printf("Setting SECOND=VALUE2 in the environment... ");
fflush(stdout); fflush(stdout);
if (SDL_putenv("SECOND=VALUE2") == 0) { if (SDL_setenv("SECOND", "VALUE2", 0) == 0) {
printf("okay\n"); printf("okay\n");
} else { } else {
printf("failed\n"); printf("failed\n");
...@@ -244,7 +244,7 @@ main(int argc, char *argv[]) ...@@ -244,7 +244,7 @@ main(int argc, char *argv[])
} }
printf("Setting FIRST=NOVALUE in the environment... "); printf("Setting FIRST=NOVALUE in the environment... ");
fflush(stdout); fflush(stdout);
if (SDL_putenv("FIRST=NOVALUE") == 0) { if (SDL_setenv("FIRST", "NOVALUE", 1) == 0) {
printf("okay\n"); printf("okay\n");
} else { } else {
printf("failed\n"); printf("failed\n");
...@@ -267,4 +267,5 @@ main(int argc, char *argv[]) ...@@ -267,4 +267,5 @@ main(int argc, char *argv[])
return (0); return (0);
} }
#endif /* TEST_MAIN */ #endif /* TEST_MAIN */
/* vi: set ts=4 sw=4 expandtab: */ /* vi: set ts=4 sw=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment