summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
Diffstat (limited to 'io')
-rw-r--r--io/bufio.ts6
-rw-r--r--io/bufio_test.ts14
-rw-r--r--io/ioutil.ts4
-rw-r--r--io/util.ts4
4 files changed, 20 insertions, 8 deletions
diff --git a/io/bufio.ts b/io/bufio.ts
index dc6d6b3cc..29ca5435d 100644
--- a/io/bufio.ts
+++ b/io/bufio.ts
@@ -207,8 +207,10 @@ export class BufReader implements Reader {
/** readString() reads until the first occurrence of delim in the input,
* returning a string containing the data up to and including the delimiter.
* If ReadString encounters an error before finding a delimiter,
- * it returns the data read before the error and the error itself (often io.EOF).
- * ReadString returns err != nil if and only if the returned data does not end in
+ * it returns the data read before the error and the error itself
+ * (often io.EOF).
+ * ReadString returns err != nil if and only if the returned data does not end
+ * in
* delim.
* For simple uses, a Scanner may be more convenient.
*/
diff --git a/io/bufio_test.ts b/io/bufio_test.ts
index 6433c7a5a..1ea664c5c 100644
--- a/io/bufio_test.ts
+++ b/io/bufio_test.ts
@@ -143,7 +143,8 @@ test(async function bufioBufReader(): Promise<void> {
test(async function bufioBufferFull(): Promise<void> {
const longString =
- "And now, hello, world! It is the time for all good men to come to the aid of their party";
+ "And now, hello, world! It is the time for all good men to come to the" +
+ " aid of their party";
const buf = new BufReader(stringsReader(longString), MIN_READ_BUFFER_SIZE);
const decoder = new TextDecoder();
@@ -165,7 +166,8 @@ const testInput = encoder.encode(
"012\n345\n678\n9ab\ncde\nfgh\nijk\nlmn\nopq\nrst\nuvw\nxy"
);
const testInputrn = encoder.encode(
- "012\r\n345\r\n678\r\n9ab\r\ncde\r\nfgh\r\nijk\r\nlmn\r\nopq\r\nrst\r\nuvw\r\nxy\r\n\n\r\n"
+ "012\r\n345\r\n678\r\n9ab\r\ncde\r\nfgh\r\nijk\r\nlmn\r\nopq\r\nrst\r\n" +
+ "uvw\r\nxy\r\n\n\r\n"
);
const testOutput = encoder.encode("0123456789abcdefghijklmnopqrstuvwxy");
@@ -281,13 +283,17 @@ test(async function bufioPeek(): Promise<void> {
const r = await buf.peek(1);
assert(r === EOF);
/* TODO
- // Test for issue 3022, not exposing a reader's error on a successful Peek.
+ Test for issue 3022, not exposing a reader's error on a successful Peek.
buf = NewReaderSize(dataAndEOFReader("abcd"), 32)
if s, err := buf.Peek(2); string(s) != "ab" || err != nil {
t.Errorf(`Peek(2) on "abcd", EOF = %q, %v; want "ab", nil`, string(s), err)
}
if s, err := buf.Peek(4); string(s) != "abcd" || err != nil {
- t.Errorf(`Peek(4) on "abcd", EOF = %q, %v; want "abcd", nil`, string(s), err)
+ t.Errorf(
+ `Peek(4) on "abcd", EOF = %q, %v; want "abcd", nil`,
+ string(s),
+ err
+ )
}
if n, err := buf.Read(p[0:5]); string(p[0:n]) != "abcd" || err != nil {
t.Fatalf("Read after peek = %q, %v; want abcd, EOF", p[0:n], err)
diff --git a/io/ioutil.ts b/io/ioutil.ts
index 979549fbf..c13eff0d4 100644
--- a/io/ioutil.ts
+++ b/io/ioutil.ts
@@ -4,7 +4,9 @@ type Reader = Deno.Reader;
type Writer = Deno.Writer;
import { assert } from "../testing/asserts.ts";
-/** copy N size at the most. If read size is lesser than N, then returns nread */
+/** copy N size at the most.
+ * If read size is lesser than N, then returns nread
+ * */
export async function copyN(
dest: Writer,
r: Reader,
diff --git a/io/util.ts b/io/util.ts
index a0cf08102..96ff10b0e 100644
--- a/io/util.ts
+++ b/io/util.ts
@@ -25,7 +25,9 @@ export function stringsReader(s: string): Reader {
return new Buffer(encode(s).buffer);
}
-/** Create or open a temporal file at specified directory with prefix and postfix */
+/** Create or open a temporal file at specified directory with prefix and
+ * postfix
+ * */
export async function tempFile(
dir: string,
opts: {