summaryrefslogtreecommitdiff
path: root/js/process_test.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2019-03-28 21:09:46 +0100
committerRyan Dahl <ry@tinyclouds.org>2019-03-28 16:09:46 -0400
commitbdc455dd25b4c0d14fd30bc32c07206b2b93a007 (patch)
treef56468128eab8cdccbd010cccf2d37aaf1115a0c /js/process_test.ts
parentc25e262b04c15d4de7107cc131de467882e7dcec (diff)
Add Process.stderrOutput() (#1828)
Diffstat (limited to 'js/process_test.ts')
-rw-r--r--js/process_test.ts11
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: [