Skip to content

Commit 0fa11d7

Browse files
anderskclaude
andcommitted
test(desktop): Cover an edited generated URL handler entry
Startup has always rewritten the generated handler entry, so an edited Exec in it never took effect. Test that such an entry still counts as generated. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Anders Kaseorg <[email protected]>
1 parent 53d76a1 commit 0fa11d7

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎apps/desktop/src/app/DesktopLinuxUrlHandler.test.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,16 @@ describe("DesktopLinuxUrlHandler", () => {
196196
assert.include(entry, "Icon=/home/al ice/icons/T3\\\\x.png");
197197
});
198198

199+
it("treats a generated entry with an edited Exec as generated", () => {
200+
// Startup has always rewritten this file, so an edited Exec never took effect.
201+
const entry = DesktopLinuxUrlHandler.renderUrlHandlerDesktopEntry({
202+
displayName: "T3 Code (Beta)",
203+
execTarget: "t3code",
204+
scheme: "t3code",
205+
}).replace(/^Exec=.*$/m, "Exec=t3code --ozone-platform=x11 %U");
206+
assert.isTrue(DesktopLinuxUrlHandler.isGeneratedUrlHandlerDesktopEntry(entry, "t3code"));
207+
});
208+
199209
it.effect(
200210
"writes the handler entry, refreshes the MIME cache, and claims the scheme default",
201211
() => {

0 commit comments

Comments
 (0)