summaryrefslogtreecommitdiff
path: root/std/textproto/test.ts
diff options
context:
space:
mode:
authoruki00a <uki00a@gmail.com>2020-05-20 23:34:20 +0900
committerGitHub <noreply@github.com>2020-05-20 16:34:20 +0200
commit9b4da88a96ce4c793e7b15d9b340fa6326a29a82 (patch)
treec1749398932a769be55022e83b50002d40702c5b /std/textproto/test.ts
parentef14d62462d7f5bc2f091c3521409b4a16c5f87c (diff)
fix(std/io): BufReader should not share the internal buffer across reads (#4543)
Diffstat (limited to 'std/textproto/test.ts')
-rw-r--r--std/textproto/test.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/std/textproto/test.ts b/std/textproto/test.ts
index 3b71bc08c..ec66bfd8c 100644
--- a/std/textproto/test.ts
+++ b/std/textproto/test.ts
@@ -180,3 +180,16 @@ test({
assertEquals(m.get("Content-Disposition"), 'form-data; name="test"');
},
});
+
+test({
+ name: "[textproto] #4521 issue",
+ async fn() {
+ const input = "abcdefghijklmnopqrstuvwxyz";
+ const bufSize = 25;
+ const tp = new TextProtoReader(
+ new BufReader(stringsReader(input), bufSize)
+ );
+ const line = await tp.readLine();
+ assertEquals(line, input);
+ },
+});