diff options
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); |