summaryrefslogtreecommitdiff
path: root/std/io/writers_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/io/writers_test.ts')
-rw-r--r--std/io/writers_test.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/std/io/writers_test.ts b/std/io/writers_test.ts
index a50f8b3d1..f27885f81 100644
--- a/std/io/writers_test.ts
+++ b/std/io/writers_test.ts
@@ -12,3 +12,12 @@ test("ioStringWriter", async function (): Promise<void> {
await copy(r, w);
assertEquals(w.toString(), "base0123456789");
});
+
+test("ioStringWriterSync", function (): void {
+ const encoder = new TextEncoder();
+ const w = new StringWriter("");
+ w.writeSync(encoder.encode("deno"));
+ assertEquals(w.toString(), "deno");
+ w.writeSync(encoder.encode("\nland"));
+ assertEquals(w.toString(), "deno\nland");
+});