1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-26 16:09:27 -05:00
denoland-deno/cli/tests/unit/umask_test.ts

16 lines
411 B
TypeScript
Raw Normal View History

2022-01-20 02:10:16 -05:00
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
import { assertEquals } from "./test_util.ts";
2020-03-10 15:11:27 -04:00
Deno.test(
2020-03-10 15:11:27 -04:00
{
ignore: Deno.build.os === "windows",
2020-03-10 15:11:27 -04:00
},
function umaskSuccess() {
2020-03-10 15:11:27 -04:00
const prevMask = Deno.umask(0o020);
const newMask = Deno.umask(prevMask);
const finalMask = Deno.umask();
assertEquals(newMask, 0o020);
assertEquals(finalMask, prevMask);
},
2020-03-10 15:11:27 -04:00
);