summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration/lsp_tests.rs12
-rw-r--r--cli/tests/test/allow_all.out4
-rw-r--r--cli/tests/test/allow_all.ts2
-rw-r--r--cli/tests/test/allow_none.out6
-rw-r--r--cli/tests/test/allow_none.ts2
-rw-r--r--cli/tests/test/ignore_permissions.ts2
-rw-r--r--cli/tests/unit/test_util.ts4
-rw-r--r--cli/tests/workers/no_permissions_worker.js4
8 files changed, 18 insertions, 18 deletions
diff --git a/cli/tests/integration/lsp_tests.rs b/cli/tests/integration/lsp_tests.rs
index e66b59c2b..a27ebec45 100644
--- a/cli/tests/integration/lsp_tests.rs
+++ b/cli/tests/integration/lsp_tests.rs
@@ -502,7 +502,7 @@ fn lsp_hover_unstable_disabled() {
"uri": "file:///a/file.ts",
"languageId": "typescript",
"version": 1,
- "text": "console.log(Deno.openPlugin);\n"
+ "text": "console.log(Deno.dlopen);\n"
}
}),
);
@@ -537,7 +537,7 @@ fn lsp_hover_unstable_disabled() {
},
"end": {
"line": 0,
- "character": 27
+ "character": 23
}
}
}))
@@ -555,7 +555,7 @@ fn lsp_hover_unstable_enabled() {
"uri": "file:///a/file.ts",
"languageId": "typescript",
"version": 1,
- "text": "console.log(Deno.openPlugin);\n"
+ "text": "console.log(Deno.ppid);\n"
}
}),
);
@@ -580,9 +580,9 @@ fn lsp_hover_unstable_enabled() {
"contents":[
{
"language":"typescript",
- "value":"function Deno.openPlugin(filename: string): number"
+ "value":"const Deno.ppid: number"
},
- "**UNSTABLE**: new API, yet to be vetted.\n\nOpen and initialize a plugin.\n\n```ts\nimport { assert } from \"https://deno.land/std/testing/asserts.ts\";\nconst rid = Deno.openPlugin(\"./path/to/some/plugin.so\");\n\n// The Deno.core namespace is needed to interact with plugins, but this is\n// internal so we use ts-ignore to skip type checking these calls.\n// @ts-ignore\nconst { op_test_sync, op_test_async } = Deno.core.ops();\n\nassert(op_test_sync);\nassert(op_test_async);\n\n// @ts-ignore\nconst result = Deno.core.opSync(\"op_test_sync\");\n\n// @ts-ignore\nconst result = await Deno.core.opAsync(\"op_test_sync\");\n```\n\nRequires `allow-plugin` permission.\n\nThe plugin system is not stable and will change in the future, hence the\nlack of docs. For now take a look at the example\nhttps://github.com/denoland/deno/tree/main/test_plugin"
+ "The pid of the current process's parent."
],
"range":{
"start":{
@@ -591,7 +591,7 @@ fn lsp_hover_unstable_enabled() {
},
"end":{
"line":0,
- "character":27
+ "character":21
}
}
}))
diff --git a/cli/tests/test/allow_all.out b/cli/tests/test/allow_all.out
index 3be26c6e0..9b7367b94 100644
--- a/cli/tests/test/allow_all.out
+++ b/cli/tests/test/allow_all.out
@@ -10,8 +10,8 @@ test env false ... ok [WILDCARD]
test env true ... ok [WILDCARD]
test run false ... ok [WILDCARD]
test run true ... ok [WILDCARD]
-test plugin false ... ok [WILDCARD]
-test plugin true ... ok [WILDCARD]
+test ffi false ... ok [WILDCARD]
+test ffi true ... ok [WILDCARD]
test hrtime false ... ok [WILDCARD]
test hrtime true ... ok [WILDCARD]
diff --git a/cli/tests/test/allow_all.ts b/cli/tests/test/allow_all.ts
index e4e12144e..b8f8c647d 100644
--- a/cli/tests/test/allow_all.ts
+++ b/cli/tests/test/allow_all.ts
@@ -6,7 +6,7 @@ const permissions: Deno.PermissionName[] = [
"net",
"env",
"run",
- "plugin",
+ "ffi",
"hrtime",
];
diff --git a/cli/tests/test/allow_none.out b/cli/tests/test/allow_none.out
index 96fb72278..b79c7e6bf 100644
--- a/cli/tests/test/allow_none.out
+++ b/cli/tests/test/allow_none.out
@@ -5,7 +5,7 @@ test write ... FAILED [WILDCARD]
test net ... FAILED [WILDCARD]
test env ... FAILED [WILDCARD]
test run ... FAILED [WILDCARD]
-test plugin ... FAILED [WILDCARD]
+test ffi ... FAILED [WILDCARD]
test hrtime ... FAILED [WILDCARD]
failures:
@@ -30,7 +30,7 @@ run
PermissionDenied: Can't escalate parent thread permissions
[WILDCARD]
-plugin
+ffi
PermissionDenied: Can't escalate parent thread permissions
[WILDCARD]
@@ -45,7 +45,7 @@ failures:
net
env
run
- plugin
+ ffi
hrtime
test result: FAILED. 0 passed; 7 failed; 0 ignored; 0 measured; 0 filtered out [WILDCARD]
diff --git a/cli/tests/test/allow_none.ts b/cli/tests/test/allow_none.ts
index c0a930eb1..7872c774e 100644
--- a/cli/tests/test/allow_none.ts
+++ b/cli/tests/test/allow_none.ts
@@ -6,7 +6,7 @@ const permissions: Deno.PermissionName[] = [
"net",
"env",
"run",
- "plugin",
+ "ffi",
"hrtime",
];
diff --git a/cli/tests/test/ignore_permissions.ts b/cli/tests/test/ignore_permissions.ts
index bd0567a46..ff3084441 100644
--- a/cli/tests/test/ignore_permissions.ts
+++ b/cli/tests/test/ignore_permissions.ts
@@ -6,7 +6,7 @@ Deno.test({
net: true,
env: true,
run: true,
- plugin: true,
+ ffi: true,
hrtime: true,
},
ignore: true,
diff --git a/cli/tests/unit/test_util.ts b/cli/tests/unit/test_util.ts
index 79e93d70d..6745946c6 100644
--- a/cli/tests/unit/test_util.ts
+++ b/cli/tests/unit/test_util.ts
@@ -32,7 +32,7 @@ interface UnitTestPermissions {
net?: boolean;
env?: boolean;
run?: boolean;
- plugin?: boolean;
+ ffi?: boolean;
hrtime?: boolean;
}
@@ -84,7 +84,7 @@ export function unitTest(
net: false,
env: false,
run: false,
- plugin: false,
+ ffi: false,
hrtime: false,
}, options.perms),
};
diff --git a/cli/tests/workers/no_permissions_worker.js b/cli/tests/workers/no_permissions_worker.js
index 8a4f79d57..db0d911ac 100644
--- a/cli/tests/workers/no_permissions_worker.js
+++ b/cli/tests/workers/no_permissions_worker.js
@@ -1,14 +1,14 @@
self.onmessage = async () => {
const hrtime = await Deno.permissions.query({ name: "hrtime" });
const net = await Deno.permissions.query({ name: "net" });
- const plugin = await Deno.permissions.query({ name: "plugin" });
+ const ffi = await Deno.permissions.query({ name: "ffi" });
const read = await Deno.permissions.query({ name: "read" });
const run = await Deno.permissions.query({ name: "run" });
const write = await Deno.permissions.query({ name: "write" });
self.postMessage(
hrtime.state === "denied" &&
net.state === "denied" &&
- plugin.state === "denied" &&
+ ffi.state === "denied" &&
read.state === "denied" &&
run.state === "denied" &&
write.state === "denied",