2020-03-10 15:11:27 -04:00
|
|
|
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
2020-09-27 06:22:32 -04:00
|
|
|
import { assertEquals, unitTest } from "./test_util.ts";
|
2020-03-10 15:11:27 -04:00
|
|
|
|
|
|
|
unitTest(
|
|
|
|
{
|
2020-04-28 12:35:23 -04:00
|
|
|
ignore: Deno.build.os === "windows",
|
2020-03-10 15:11:27 -04:00
|
|
|
},
|
|
|
|
function umaskSuccess(): void {
|
|
|
|
const prevMask = Deno.umask(0o020);
|
|
|
|
const newMask = Deno.umask(prevMask);
|
|
|
|
const finalMask = Deno.umask();
|
|
|
|
assertEquals(newMask, 0o020);
|
|
|
|
assertEquals(finalMask, prevMask);
|
2020-07-14 15:24:17 -04:00
|
|
|
},
|
2020-03-10 15:11:27 -04:00
|
|
|
);
|