mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 04:39:10 +00:00
Add Process.output (#1235)
This commit is contained in:
parent
e749b37b7c
commit
d43a4be0d2
2 changed files with 30 additions and 2 deletions
|
@ -176,3 +176,14 @@ testPerm({ run: true }, async function runStderrPiped() {
|
|||
assertEqual(status.signal, undefined);
|
||||
p.close();
|
||||
});
|
||||
|
||||
testPerm({ run: true }, async function runOutput() {
|
||||
const p = run({
|
||||
args: ["python", "-c", "import sys; sys.stdout.write('hello')"],
|
||||
stdout: "piped"
|
||||
});
|
||||
const output = await p.output();
|
||||
const s = new TextDecoder().decode(output);
|
||||
assertEqual(s, "hello");
|
||||
p.close();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue