diff --git a/test/regression/issue/15189.test.ts b/test/regression/issue/15189.test.ts index a20334c3d7..f83c309767 100644 --- a/test/regression/issue/15189.test.ts +++ b/test/regression/issue/15189.test.ts @@ -20,19 +20,40 @@ describe("bun shell", () => { // slow expect(await $({ raw: ["echo " + 'a"a"'.repeat(1000000)] } as any).text()).toBe("aa".repeat(1000000) + "\n"); }); - it("passes correct number of arguments with empty string substitutions", async () => { + it.todo("echo works 1", async () => expect(await $`echo -n`.text()).toBe("")); + it.todo("echo works 2", async () => expect(await $`echo -n abc`.text()).toBe("abc")); + it("echo works 3", async () => expect(await $`echo abc`.text()).toBe("abc\n")); + it("echo works 4", async () => expect(await $`echo`.text()).toBe("\n")); + it("echo works 5", async () => expect(await $`echo abc def`.text()).toBe("abc def\n")); + it.todo("echo works 6", async () => expect(await $`echo -s abc def`.text()).toBe("abcdef\n")); + it.todo("echo works 7", async () => expect(await $`echo -E abc def`.text()).toBe("abc def\n")); + it.todo("echo works 8", async () => expect(await $`echo abc\ndef`.text()).toBe("abc\\ndef\n")); + it.todo("echo works 9", async () => expect(await $`echo -e abc\ndef`.text()).toBe("abc\ndef\n")); + it.todo("passes correct number of arguments with empty string substitutions", async () => { expect(await $`echo 1 ${""} 2`.text()).toBe("1 2\n"); }); - it("passes correct number of arguments with empty string substitutions 2", async () => { + it.todo("passes correct number of arguments with empty string substitutions 2", async () => { expect(await $`echo 1 "${""}" 2`.text()).toBe("1 2\n"); }); - it("passes correct number of arguments with empty string substitutions 3", async () => { + it.todo("passes correct number of arguments with empty string substitutions 3", async () => { expect(await $`echo 1 '${""}' 2`.text()).toBe("1 2\n"); }); - it("passes correct number of arguments with empty double string quotes", async () => { + it.todo("passes correct number of arguments with empty strings", async () => { + expect(await $`echo 1 $(echo -n) 2`.text()).toBe("1 2\n"); + }); + it.todo("passes correct number of arguments with empty strings 2", async () => { + expect(await $`echo 1 $(echo) 2`.text()).toBe("1 2\n"); + }); + it.todo("passes correct number of arguments with empty strings 3", async () => { + expect(await $`echo 1 $(echo -n 3) 2`.text()).toBe("1 3 2\n"); + }); + it("passes correct number of arguments with empty strings 4", async () => { + expect(await $`echo 1 $(echo 3) 2`.text()).toBe("1 3 2\n"); + }); + it.todo("passes correct number of arguments with empty double string quotes", async () => { expect(await $`echo "1" "" "2"`.text()).toBe("1 2\n"); }); - it("passes correct number of arguments with empty single string quotes", async () => { + it.todo("passes correct number of arguments with empty single string quotes", async () => { expect(await $`echo '1' '' '2'`.text()).toBe("1 2\n"); }); it("doesn't cause invalid js string ref error with a number after a string ref", async () => {