Skip to content

Commit

Permalink
fix: fix errno in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k committed Apr 30, 2021
1 parent 9b5b47e commit 161932d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion node/internal_binding/fs_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ Deno.test("[node/internal_binding/fs] writeBufferSync", async () => {
ctx,
);
assertEquals(bytesWritten, 0);
assertEquals(ctx.errno, 9);
if (Deno.build.os) {
assertEquals(ctx.errno, 5); // Access is denied
} else {
assertEquals(ctx.errno, 9); // Bad file descriptor
}
} finally {
Deno.close(file.rid);
Deno.remove(tempfile);
Expand Down

0 comments on commit 161932d

Please sign in to comment.