mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
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:
1 parent
a484f1acf3
commit
da66054e5d
2 files changed
+10
No files matched your search
@@ -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.
Reference in new issue
Block a user