-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add tests for main() argument handling
This test provides missing coverage for __wasi_args_get() and __wasi_args_sizes_get(), which translate to argc and argv in WASI applications. PR-URL: #31426 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
- Loading branch information
1 parent
e9462b4
commit b25ea9b
Showing
3 changed files
with
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include <assert.h> | ||
#include <string.h> | ||
|
||
int main(int argc, char** argv) { | ||
assert(argc == 3); | ||
assert(0 == strcmp(argv[0], "foo")); | ||
assert(0 == strcmp(argv[1], "-bar")); | ||
assert(0 == strcmp(argv[2], "--baz=value")); | ||
return 0; | ||
} |
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
Binary file not shown.