From fa4089f4613b2dc9e455629b1cfff379f668dcdb Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 04:54:26 +0000 Subject: [PATCH] Cover tabbed environment port trimming semantics Co-authored-by: Theo Browne --- apps/t3/src/cli.test.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/apps/t3/src/cli.test.ts b/apps/t3/src/cli.test.ts index 4762085b0b..8414013976 100644 --- a/apps/t3/src/cli.test.ts +++ b/apps/t3/src/cli.test.ts @@ -54,6 +54,22 @@ describe("parseCliOptions", () => { expect(options.webPortLocked).toBe(true); }); + it("trims tabbed environment variable port values before parsing", () => { + const options = parseCliOptions( + [], + { + T3_BACKEND_PORT: "\t5001\t", + T3_WEB_PORT: "\t5002\t", + }, + "/workspace", + ); + + expect(options.backendPort).toBe(5001); + expect(options.webPort).toBe(5002); + expect(options.backendPortLocked).toBe(true); + expect(options.webPortLocked).toBe(true); + }); + it("accepts flexible truthy values for T3_NO_OPEN", () => { const options = parseCliOptions( [],