summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/tests/unit/read_dir_test.ts20
1 files changed, 20 insertions, 0 deletions
diff --git a/cli/tests/unit/read_dir_test.ts b/cli/tests/unit/read_dir_test.ts
index 4a0719a4b..829f7bfa2 100644
--- a/cli/tests/unit/read_dir_test.ts
+++ b/cli/tests/unit/read_dir_test.ts
@@ -78,3 +78,23 @@ unitTest({ perms: { read: false } }, async function readDirPerm(): Promise<
await Deno.readDir("tests/")[Symbol.asyncIterator]().next();
}, Deno.errors.PermissionDenied);
});
+
+unitTest(
+ { perms: { read: true }, ignore: Deno.build.os == "windows" },
+ async function readDirDevFd(): Promise<
+ void
+ > {
+ for await (const _ of Deno.readDir("/dev/fd")) {
+ // We don't actually care whats in here; just that we don't panic on non regular entries
+ }
+ },
+);
+
+unitTest(
+ { perms: { read: true }, ignore: Deno.build.os == "windows" },
+ function readDirDevFdSync(): void {
+ for (const _ of Deno.readDirSync("/dev/fd")) {
+ // We don't actually care whats in here; just that we don't panic on non regular file entries
+ }
+ },
+);