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