Skip to content

Commit e02db13

Browse files
committed
test(web-host): add e2e tests for tee -a
1 parent 4efa311 commit e02db13

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

packages/web-host/tests/repl-plugins.spec.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,18 @@ test("tee README.md", async ({ page }) => {
120120
expectStdout: "Some Content",
121121
});
122122
});
123+
124+
test("tee -a output.txt", async ({ page }) => {
125+
await page.goto("/#repl");
126+
await fillAndSubmitCommand(page, "echo Some Initial Content");
127+
await fillAndSubmitCommand(page, "tee output.txt", {
128+
expectStdout: "Some Initial Content",
129+
});
130+
await fillAndSubmitCommand(page, "echo Some More Content");
131+
await fillAndSubmitCommand(page, "tee -a output.txt", {
132+
expectStdout: "Some More Content",
133+
});
134+
await fillAndSubmitCommand(page, "cat output.txt", {
135+
expectStdout: "Some Initial Content\nSome More Content",
136+
});
137+
});

0 commit comments

Comments
 (0)