summaryrefslogtreecommitdiff
path: root/io/bufio_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'io/bufio_test.ts')
-rw-r--r--io/bufio_test.ts14
1 files changed, 10 insertions, 4 deletions
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)