mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
test(cli): align unit test permissions with runtime test permissions (#12189)
This commit is contained in:
parent
87e78802b0
commit
830586d242
45 changed files with 664 additions and 574 deletions
|
@ -34,7 +34,7 @@ function assertDirectory(path: string, mode?: number) {
|
|||
}
|
||||
|
||||
unitTest(
|
||||
{ perms: { read: true, write: true } },
|
||||
{ permissions: { read: true, write: true } },
|
||||
function renameSyncSuccess() {
|
||||
const testDir = Deno.makeTempDirSync();
|
||||
const oldpath = testDir + "/oldpath";
|
||||
|
@ -47,7 +47,7 @@ unitTest(
|
|||
);
|
||||
|
||||
unitTest(
|
||||
{ perms: { read: true, write: true } },
|
||||
{ permissions: { read: true, write: true } },
|
||||
function renameSyncWithURL() {
|
||||
const testDir = Deno.makeTempDirSync();
|
||||
const oldpath = testDir + "/oldpath";
|
||||
|
@ -63,7 +63,7 @@ unitTest(
|
|||
);
|
||||
|
||||
unitTest(
|
||||
{ perms: { read: false, write: true } },
|
||||
{ permissions: { read: false, write: true } },
|
||||
function renameSyncReadPerm() {
|
||||
assertThrows(() => {
|
||||
const oldpath = "/oldbaddir";
|
||||
|
@ -74,7 +74,7 @@ unitTest(
|
|||
);
|
||||
|
||||
unitTest(
|
||||
{ perms: { read: true, write: false } },
|
||||
{ permissions: { read: true, write: false } },
|
||||
function renameSyncWritePerm() {
|
||||
assertThrows(() => {
|
||||
const oldpath = "/oldbaddir";
|
||||
|
@ -85,7 +85,7 @@ unitTest(
|
|||
);
|
||||
|
||||
unitTest(
|
||||
{ perms: { read: true, write: true } },
|
||||
{ permissions: { read: true, write: true } },
|
||||
async function renameSuccess() {
|
||||
const testDir = Deno.makeTempDirSync();
|
||||
const oldpath = testDir + "/oldpath";
|
||||
|
@ -98,7 +98,7 @@ unitTest(
|
|||
);
|
||||
|
||||
unitTest(
|
||||
{ perms: { read: true, write: true } },
|
||||
{ permissions: { read: true, write: true } },
|
||||
async function renameWithURL() {
|
||||
const testDir = Deno.makeTempDirSync();
|
||||
const oldpath = testDir + "/oldpath";
|
||||
|
@ -126,7 +126,10 @@ function writeFileString(filename: string, s: string) {
|
|||
}
|
||||
|
||||
unitTest(
|
||||
{ ignore: Deno.build.os === "windows", perms: { read: true, write: true } },
|
||||
{
|
||||
ignore: Deno.build.os === "windows",
|
||||
permissions: { read: true, write: true },
|
||||
},
|
||||
function renameSyncErrorsUnix() {
|
||||
const testDir = Deno.makeTempDirSync();
|
||||
const oldfile = testDir + "/oldfile";
|
||||
|
@ -201,7 +204,10 @@ unitTest(
|
|||
);
|
||||
|
||||
unitTest(
|
||||
{ ignore: Deno.build.os !== "windows", perms: { read: true, write: true } },
|
||||
{
|
||||
ignore: Deno.build.os !== "windows",
|
||||
permissions: { read: true, write: true },
|
||||
},
|
||||
function renameSyncErrorsWin() {
|
||||
const testDir = Deno.makeTempDirSync();
|
||||
const oldfile = testDir + "/oldfile";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue