diff options
Diffstat (limited to 'textproto_test.ts')
| -rw-r--r-- | textproto_test.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/textproto_test.ts b/textproto_test.ts index 57ee99459..25c12b0e8 100644 --- a/textproto_test.ts +++ b/textproto_test.ts @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file. import { BufReader } from "./bufio.ts"; -import { TextProtoReader } from "./textproto.ts"; +import { TextProtoReader, append } from "./textproto.ts"; import { stringsReader } from "./util.ts"; import { test, @@ -82,3 +82,12 @@ test(async function textprotoReadMIMEHeaderNonCompliant() { } */ }); + +test(async function textprotoAppend() { + const enc = new TextEncoder(); + const dec = new TextDecoder(); + const u1 = enc.encode("Hello "); + const u2 = enc.encode("World"); + const joined = append(u1, u2); + assertEqual(dec.decode(joined), "Hello World"); +}); |
