diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2019-03-28 21:09:46 +0100 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-03-28 16:09:46 -0400 |
commit | bdc455dd25b4c0d14fd30bc32c07206b2b93a007 (patch) | |
tree | f56468128eab8cdccbd010cccf2d37aaf1115a0c /js/process_test.ts | |
parent | c25e262b04c15d4de7107cc131de467882e7dcec (diff) |
Add Process.stderrOutput() (#1828)
Diffstat (limited to 'js/process_test.ts')
-rw-r--r-- | js/process_test.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/process_test.ts b/js/process_test.ts index b442f0092..051841ffe 100644 --- a/js/process_test.ts +++ b/js/process_test.ts @@ -187,6 +187,17 @@ testPerm({ run: true }, async function runOutput() { p.close(); }); +testPerm({ run: true }, async function runStderrOutput() { + const p = run({ + args: ["python", "-c", "import sys; sys.stderr.write('error')"], + stderr: "piped" + }); + const error = await p.stderrOutput(); + const s = new TextDecoder().decode(error); + assertEquals(s, "error"); + p.close(); +}); + testPerm({ run: true }, async function runEnv() { const p = run({ args: [ |