2022-01-20 02:10:16 -05:00
|
|
|
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
2021-11-23 11:45:18 -05:00
|
|
|
import { assertEquals } from "./test_util.ts";
|
2020-03-10 15:11:27 -04:00
|
|
|
|
2021-11-23 11:45:18 -05:00
|
|
|
Deno.test(
|
2020-03-10 15:11:27 -04:00
|
|
|
{
|
2020-04-28 12:35:23 -04:00
|
|
|
ignore: Deno.build.os === "windows",
|
2020-03-10 15:11:27 -04:00
|
|
|
},
|
2021-08-05 07:08:58 -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-07-14 15:24:17 -04:00
|
|
|
},
|
2020-03-10 15:11:27 -04:00
|
|
|
);
|