From 55a554edc81a0e70a5777076105573ede2e36bb4 Mon Sep 17 00:00:00 2001 From: pfg Date: Tue, 19 Nov 2024 15:58:24 -0800 Subject: [PATCH] another test --- test/regression/issue/15189.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/regression/issue/15189.test.ts b/test/regression/issue/15189.test.ts index a4f3d07ad7..3d1cdbcd1b 100644 --- a/test/regression/issue/15189.test.ts +++ b/test/regression/issue/15189.test.ts @@ -29,6 +29,9 @@ describe("bun shell", () => { "Invalid JS string ref (number too high)", ); }); + it("does not crash with an invalid string ref 5", async () => { + expect(() => $`echo __bunstr_123a`.text()).toThrowError("Invalid JS string ref (missing '.' at end)"); + }); it("doesn't parse string refs inside substitution", async () => { expect(await $`echo ${"\x08__bunstr_123."}`.text()).toBe("\x08__bunstr_123.\n"); });