diff options
Diffstat (limited to 'tests/unistd/access.c')
-rw-r--r-- | tests/unistd/access.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unistd/access.c b/tests/unistd/access.c index 89428610..4d5ba08e 100644 --- a/tests/unistd/access.c +++ b/tests/unistd/access.c @@ -1,8 +1,16 @@ #include <stdio.h> #include <errno.h> #include <unistd.h> +#include <emscripten.h> int main() { + EM_ASM( + FS.writeFile('/forbidden', ''); FS.chmod('/forbidden', 0000); + FS.writeFile('/readable', ''); FS.chmod('/readable', 0444); + FS.writeFile('/writeable', ''); FS.chmod('/writeable', 0222); + FS.writeFile('/allaccess', ''); FS.chmod('/allaccess', 0777); + ); + char* files[] = {"/readable", "/writeable", "/allaccess", "/forbidden", "/nonexistent"}; for (int i = 0; i < sizeof files / sizeof files[0]; i++) { |