aboutsummaryrefslogtreecommitdiff
path: root/tests/unistd/curdir.c
diff options
context:
space:
mode:
authorAnthony Pesch <inolen@gmail.com>2013-09-02 22:32:55 -0700
committerAnthony Pesch <inolen@gmail.com>2013-09-03 22:00:02 -0700
commit9ba95541831fcddf3e99554cd3a11c87cb935d3b (patch)
tree875433d8010bf80c6c90231fd3617cfb6391209e /tests/unistd/curdir.c
parent47d35839b54bedb65427bcac153f112e33cea478 (diff)
updated unistd and fs_base tests to use new FS APIs
Diffstat (limited to 'tests/unistd/curdir.c')
-rw-r--r--tests/unistd/curdir.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unistd/curdir.c b/tests/unistd/curdir.c
index 63b9c7fe..b9f22dd7 100644
--- a/tests/unistd/curdir.c
+++ b/tests/unistd/curdir.c
@@ -2,8 +2,19 @@
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
+#include <emscripten.h>
int main() {
+ EM_ASM(
+ var dummy_device = FS.makedev(64, 0);
+ FS.registerDevice(dummy_device, {});
+ FS.mkdev('/device', dummy_device);
+
+ FS.mkdir('/folder');
+ FS.symlink('/folder', '/link');
+ FS.writeFile('/file', '', { mode: 0777 });
+ );
+
char buffer[256];
printf("getwd: %s\n", getwd(buffer));
printf("errno: %d\n", errno);