@@ -491,22 +491,19 @@ describe("loadAppBootstrap", () => {
491491 } ) ;
492492
493493 test ( "loads untracked files whose names need parser-safe diff headers" , async ( ) => {
494- if ( platform ( ) === "win32" ) {
495- return ;
496- }
497-
498494 const dir = createTempRepo ( "hunk-git-quoted-untracked-" ) ;
499495
500496 writeFileSync ( join ( dir , "tracked.ts" ) , "export const tracked = 1;\n" ) ;
501497 git ( dir , "add" , "tracked.ts" ) ;
502498 git ( dir , "commit" , "-m" , "initial" ) ;
503499
504- const quoteFile = 'quote"name.txt' ;
505- const tabFile = "tab\tname.txt" ;
506- const backslashFile = "back\\slash.txt" ;
507- writeFileSync ( join ( dir , quoteFile ) , "quote\n" ) ;
508- writeFileSync ( join ( dir , tabFile ) , "tab\n" ) ;
509- writeFileSync ( join ( dir , backslashFile ) , "backslash\n" ) ;
500+ const portableFiles = [ "space name.txt" ] ;
501+ const unixOnlyFiles = [ 'quote"name.txt' , "tab\tname.txt" , "back\\slash.txt" ] ;
502+ const fixtureFiles =
503+ platform ( ) === "win32" ? portableFiles : [ ...portableFiles , ...unixOnlyFiles ] ;
504+ for ( const file of fixtureFiles ) {
505+ writeFileSync ( join ( dir , file ) , `${ file } \n` ) ;
506+ }
510507
511508 const bootstrap = await loadFromRepo ( dir , {
512509 kind : "vcs" ,
@@ -515,10 +512,10 @@ describe("loadAppBootstrap", () => {
515512 } ) ;
516513 const paths = bootstrap . changeset . files . map ( ( file ) => file . path ) ;
517514
518- expect ( paths ) . toContain ( quoteFile ) ;
519- expect ( paths ) . toContain ( tabFile ) ;
520- expect ( paths ) . toContain ( backslashFile ) ;
521- expect ( paths ) . toHaveLength ( 3 ) ;
515+ for ( const file of fixtureFiles ) {
516+ expect ( paths ) . toContain ( file ) ;
517+ }
518+ expect ( paths ) . toHaveLength ( fixtureFiles . length ) ;
522519 } ) ;
523520
524521 test ( "still shows an untracked agent sidecar when it lives inside the repo" , async ( ) => {
@@ -1115,21 +1112,16 @@ describe("loadAppBootstrap", () => {
11151112 } ) ;
11161113
11171114 test ( "loads quoted noprefix patch text emitted for escaped git paths" , async ( ) => {
1118- if ( platform ( ) === "win32" ) {
1119- return ;
1120- }
1121-
1122- const dir = createTempRepo ( "hunk-patch-quoted-noprefix-" ) ;
1123- const fileName = "src\tfile.txt" ;
1124-
1125- writeFileSync ( join ( dir , fileName ) , "one\n" ) ;
1126- git ( dir , "add" , "." ) ;
1127- git ( dir , "commit" , "-m" , "initial" ) ;
1128-
1129- writeFileSync ( join ( dir , fileName ) , "two\n" ) ;
1130- const patchText = git ( dir , "-c" , "diff.noprefix=true" , "diff" , "--" , fileName ) ;
1131-
1132- expect ( patchText ) . toContain ( 'diff --git "src\\tfile.txt" "src\\tfile.txt"' ) ;
1115+ const patchText = [
1116+ 'diff --git "src\\tfile.txt" "src\\tfile.txt"' ,
1117+ "index 5626abf..f719efd 100644" ,
1118+ '--- "src\\tfile.txt"' ,
1119+ '+++ "src\\tfile.txt"' ,
1120+ "@@ -1 +1 @@" ,
1121+ "-one" ,
1122+ "+two" ,
1123+ "" ,
1124+ ] . join ( "\n" ) ;
11331125
11341126 const bootstrap = await loadAppBootstrap ( {
11351127 kind : "patch" ,
0 commit comments