test: improve wasi stat test

This commit improved the stat test a bit by verifying that
S_ISDIR() works properly. It also adds missing coverage for
__wasi_path_remove_directory().

PR-URL: https://github.com/nodejs/node/pull/31413
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
cjihrig authored and Rich Trott committed 2020-01-21 13:23:54 -08:00
1 parent a484f1acf3
commit da66054e5d
2 files changed
+10

No files matched your search

+10
View File
@@ -49,5 +49,15 @@ int main(void) {
ret = stat(PATH, &st);
assert(ret == -1);
ret = stat(OUTPUT_DIR, &st);
assert(ret == 0);
assert(S_ISDIR(st.st_mode));
ret = rmdir(OUTPUT_DIR);
assert(ret == 0);
ret = stat(OUTPUT_DIR, &st);
assert(ret == -1);
return 0;
}
Binary file not shown.