diff options
author | Anthony Pesch <inolen@gmail.com> | 2013-09-02 22:32:55 -0700 |
---|---|---|
committer | Anthony Pesch <inolen@gmail.com> | 2013-09-03 22:00:02 -0700 |
commit | 9ba95541831fcddf3e99554cd3a11c87cb935d3b (patch) | |
tree | 875433d8010bf80c6c90231fd3617cfb6391209e /tests/unistd/access.c | |
parent | 47d35839b54bedb65427bcac153f112e33cea478 (diff) |
updated unistd and fs_base tests to use new FS APIs
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++) { |