summaryrefslogtreecommitdiff
path: root/js/read_dir_test.ts
diff options
context:
space:
mode:
authorandy finch <andyfinch7@gmail.com>2019-05-08 19:20:30 -0400
committerRyan Dahl <ry@tinyclouds.org>2019-05-08 19:20:30 -0400
commit2edee3367dc9003b721cf87ca57e820c7acf7b25 (patch)
tree4bc91161188344d61b7e20107701c7e2af6b4ae1 /js/read_dir_test.ts
parentac8c6fec5bb2be97c8dbdb2286d2688575a593f2 (diff)
First pass at permissions whitelist (#2129)
Diffstat (limited to 'js/read_dir_test.ts')
-rw-r--r--js/read_dir_test.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/js/read_dir_test.ts b/js/read_dir_test.ts
index a8466dda9..55badd0db 100644
--- a/js/read_dir_test.ts
+++ b/js/read_dir_test.ts
@@ -3,6 +3,8 @@ import { testPerm, assert, assertEquals } from "./test_util.ts";
type FileInfo = Deno.FileInfo;
+const isWin = Deno.build.os === "win";
+
function assertSameContent(files: FileInfo[]): void {
let counter = 0;
@@ -13,7 +15,11 @@ function assertSameContent(files: FileInfo[]): void {
}
if (file.name === "002_hello.ts") {
- assertEquals(file.path, `tests/${file.name}`);
+ if (isWin) {
+ assert(file.path.endsWith(`tests\\${file.name}`));
+ } else {
+ assert(file.path.endsWith(`tests/${file.name}`));
+ }
assertEquals(file.mode!, Deno.statSync(`tests/${file.name}`).mode!);
counter++;
}