summaryrefslogtreecommitdiff
path: root/std/textproto
diff options
context:
space:
mode:
Diffstat (limited to 'std/textproto')
-rw-r--r--std/textproto/test.ts26
1 files changed, 12 insertions, 14 deletions
diff --git a/std/textproto/test.ts b/std/textproto/test.ts
index 7539e9779..a7109410b 100644
--- a/std/textproto/test.ts
+++ b/std/textproto/test.ts
@@ -2,18 +2,16 @@
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-
import { BufReader } from "../io/bufio.ts";
import { TextProtoReader } from "./mod.ts";
import { StringReader } from "../io/readers.ts";
import { assert, assertEquals, assertThrows } from "../testing/asserts.ts";
-const { test } = Deno;
function reader(s: string): TextProtoReader {
return new TextProtoReader(new BufReader(new StringReader(s)));
}
-test({
+Deno.test({
ignore: true,
name: "[textproto] Reader : DotBytes",
fn(): Promise<void> {
@@ -23,13 +21,13 @@ test({
},
});
-test("[textproto] ReadEmpty", async () => {
+Deno.test("[textproto] ReadEmpty", async () => {
const r = reader("");
const m = await r.readMIMEHeader();
assertEquals(m, null);
});
-test("[textproto] Reader", async () => {
+Deno.test("[textproto] Reader", async () => {
const r = reader("line1\nline2\n");
let s = await r.readLine();
assertEquals(s, "line1");
@@ -41,7 +39,7 @@ test("[textproto] Reader", async () => {
assert(s === null);
});
-test({
+Deno.test({
name: "[textproto] Reader : MIME Header",
async fn(): Promise<void> {
const input =
@@ -55,7 +53,7 @@ test({
},
});
-test({
+Deno.test({
name: "[textproto] Reader : MIME Header Single",
async fn(): Promise<void> {
const input = "Foo: bar\n\n";
@@ -66,7 +64,7 @@ test({
},
});
-test({
+Deno.test({
name: "[textproto] Reader : MIME Header No Key",
async fn(): Promise<void> {
const input = ": bar\ntest-1: 1\n\n";
@@ -77,7 +75,7 @@ test({
},
});
-test({
+Deno.test({
name: "[textproto] Reader : Large MIME Header",
async fn(): Promise<void> {
const data: string[] = [];
@@ -95,7 +93,7 @@ test({
// Test that we don't read MIME headers seen in the wild,
// with spaces before colons, and spaces in keys.
-test({
+Deno.test({
name: "[textproto] Reader : MIME Header Non compliant",
async fn(): Promise<void> {
const input =
@@ -119,7 +117,7 @@ test({
},
});
-test({
+Deno.test({
name: "[textproto] Reader : MIME Header Malformed",
async fn(): Promise<void> {
const input = [
@@ -142,7 +140,7 @@ test({
},
});
-test({
+Deno.test({
name: "[textproto] Reader : MIME Header Trim Continued",
async fn(): Promise<void> {
const input =
@@ -164,7 +162,7 @@ test({
},
});
-test({
+Deno.test({
name: "[textproto] #409 issue : multipart form boundary",
async fn(): Promise<void> {
const input = [
@@ -181,7 +179,7 @@ test({
},
});
-test({
+Deno.test({
name: "[textproto] #4521 issue",
async fn() {
const input = "abcdefghijklmnopqrstuvwxyz";