diff options
Diffstat (limited to 'tests/unit_node/testdata/binary_stdio.js')
-rw-r--r-- | tests/unit_node/testdata/binary_stdio.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unit_node/testdata/binary_stdio.js b/tests/unit_node/testdata/binary_stdio.js new file mode 100644 index 000000000..aa370a933 --- /dev/null +++ b/tests/unit_node/testdata/binary_stdio.js @@ -0,0 +1,11 @@ +const buffer = new Uint8Array(10); +const nread = await Deno.stdin.read(buffer); + +if (nread != 10) { + throw new Error("Too little data read"); +} + +const nwritten = await Deno.stdout.write(buffer); +if (nwritten != 10) { + throw new Error("Too little data written"); +} |