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/truncate.c | |
parent | 47d35839b54bedb65427bcac153f112e33cea478 (diff) |
updated unistd and fs_base tests to use new FS APIs
Diffstat (limited to 'tests/unistd/truncate.c')
-rw-r--r-- | tests/unistd/truncate.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unistd/truncate.c b/tests/unistd/truncate.c index 18920976..b1d9fc96 100644 --- a/tests/unistd/truncate.c +++ b/tests/unistd/truncate.c @@ -4,8 +4,15 @@ #include <fcntl.h> #include <sys/stat.h> #include <string.h> +#include <emscripten.h> int main() { + EM_ASM( + FS.writeFile('/towrite', 'abcdef'); + FS.writeFile('/toread', 'abcdef'); + FS.chmod('/toread', 0444); + ); + struct stat s; int f = open("/towrite", O_WRONLY); int f2 = open("/toread", O_RDONLY); |