| ... | ... | @@ -1687,6 +1687,31 @@ it.layer( |
| 1687 | 1687 | }), |
| 1688 | 1688 | ); |
| 1689 | 1689 | |
| 1690 | it.effect.each(["linux", "darwin", "win32"] as const)( |
| 1691 | "advertises truecolor before the PTY backend on %s without replacing explicit values", |
| 1692 | (platform) => |
| 1693 | Effect.gen(function* () { |
| 1694 | for (const [parentColor, runtimeColor, expected] of [ |
| 1695 | [undefined, undefined, "truecolor"], |
| 1696 | ["", undefined, "truecolor"], |
| 1697 | ["24bit", undefined, "24bit"], |
| 1698 | ["24bit", "", "truecolor"], |
| 1699 | ["24bit", "custom", "custom"], |
| 1700 | ] as const) { |
| 1701 | const env = Object.freeze({ COLORTERM: parentColor }); |
| 1702 | const { manager, ptyAdapter } = yield* createManager(5, { |
| 1703 | shellResolver: () => "/bin/sh", |
| 1704 | env, |
| 1705 | }).pipe(Effect.provide(withHostPlatform(platform))); |
| 1706 | yield* manager.open( |
| 1707 | openInput({ env: runtimeColor === undefined ? {} : { COLORTERM: runtimeColor } }), |
| 1708 | ); |
| 1709 | expect(ptyAdapter.spawnInputs[0]?.env.COLORTERM).toBe(expected); |
| 1710 | expect(env.COLORTERM).toBe(parentColor); |
| 1711 | } |
| 1712 | }), |
| 1713 | ); |
| 1714 | |
| 1690 | 1715 | it.effect("filters app runtime env variables from terminal sessions", () => |
| 1691 | 1716 | Effect.gen(function* () { |
| 1692 | 1717 | const { manager, ptyAdapter } = yield* createManager(5, { |