2020-06-09 12:29:12 -04:00
|
|
|
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
2020-09-27 06:22:32 -04:00
|
|
|
import { assertEquals, unitTest } from "./test_util.ts";
|
2020-06-09 12:29:12 -04:00
|
|
|
|
|
|
|
unitTest(async function stdioStdinRead() {
|
|
|
|
const nread = await Deno.stdin.read(new Uint8Array(0));
|
|
|
|
assertEquals(nread, 0);
|
|
|
|
});
|
|
|
|
|
|
|
|
unitTest(function stdioStdinReadSync() {
|
|
|
|
const nread = Deno.stdin.readSync(new Uint8Array(0));
|
|
|
|
assertEquals(nread, 0);
|
|
|
|
});
|
|
|
|
|
|
|
|
unitTest(async function stdioStdoutWrite() {
|
|
|
|
const nwritten = await Deno.stdout.write(new Uint8Array(0));
|
|
|
|
assertEquals(nwritten, 0);
|
|
|
|
});
|
|
|
|
|
|
|
|
unitTest(function stdioStdoutWriteSync() {
|
|
|
|
const nwritten = Deno.stdout.writeSync(new Uint8Array(0));
|
|
|
|
assertEquals(nwritten, 0);
|
|
|
|
});
|
|
|
|
|
|
|
|
unitTest(async function stdioStderrWrite() {
|
|
|
|
const nwritten = await Deno.stderr.write(new Uint8Array(0));
|
|
|
|
assertEquals(nwritten, 0);
|
|
|
|
});
|
|
|
|
|
|
|
|
unitTest(function stdioStderrWriteSync() {
|
|
|
|
const nwritten = Deno.stderr.writeSync(new Uint8Array(0));
|
|
|
|
assertEquals(nwritten, 0);
|
|
|
|
});
|