forked from wasmerio/wasmer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c2d210
commit 332840a
Showing
6 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
int main() | ||
{ | ||
printf("INIT\n"); | ||
const char* UNEXISTENT_ENVVAR = getenv("UNEXISTENT_ENVVAR"); | ||
printf("get UNEXISTENT_ENVVAR: %s\n",(UNEXISTENT_ENVVAR!=NULL)? UNEXISTENT_ENVVAR : "[NULL]"); | ||
printf("set UNEXISTENT_ENVVAR = SET\n"); | ||
putenv("UNEXISTENT_ENVVAR=SET"); | ||
UNEXISTENT_ENVVAR = getenv("UNEXISTENT_ENVVAR"); | ||
printf("get UNEXISTENT_ENVVAR: %s\n",(UNEXISTENT_ENVVAR!=NULL)? UNEXISTENT_ENVVAR : "[NULL]"); | ||
printf("END\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
INIT | ||
get UNEXISTENT_ENVVAR: [NULL] | ||
set UNEXISTENT_ENVVAR = SET | ||
get UNEXISTENT_ENVVAR: SET | ||
END |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#[test] | ||
fn test_env() { | ||
assert_emscripten_output!("../../emtests/env.wasm", "env", vec![], "../../emtests/env.output"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters