Skip to content

Commit 6abfce8

Browse files
only21milclaude
andcommitted
test(server): cover prn and console device worktree names
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent dcaa81a commit 6abfce8

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎apps/server/src/vcs/GitVcsDriverCore.test.ts‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4782,11 +4782,17 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => {
47824782
"fix/a>b",
47834783
"fix/a|b",
47844784
"con",
4785+
"prn",
4786+
"prn.txt",
47854787
"aux.c",
47864788
"lpt0",
47874789
"COM¹",
47884790
"COM².txt",
47894791
"LPT³",
4792+
"CONIN$",
4793+
"CONIN$.txt",
4794+
"CONOUT$",
4795+
"CONOUT$.txt",
47904796
`nul.${"n".repeat(40)}`,
47914797
]),
47924798
];
@@ -4798,7 +4804,10 @@ it.layer(layerTest)("GitVcsDriver core integration", (it) => {
47984804
const folder = pathService.basename(created.worktree.path);
47994805
assert.isAtMost(folder.length, 40);
48004806
if (unchanged.includes(branch)) assert.equal(folder, branch);
4801-
assert.notMatch(folder, /[<>"|]|^(con|aux|nul|com[0-9¹²³]|lpt[0-9¹²³])(\.|$)/i);
4807+
assert.notMatch(
4808+
folder,
4809+
/[<>"|]|^(con|prn|aux|nul|com[0-9¹²³]|lpt[0-9¹²³]|conin\$|conout\$)(\.|$)/i,
4810+
);
48024811
assert.equal(yield* git(created.worktree.path, ["branch", "--show-current"]), branch);
48034812
assert.include(
48044813
yield* git(cwd, ["-c", "core.quotePath=false", "worktree", "list", "--porcelain"]),

0 commit comments

Comments
 (0)