@@ -268,7 +268,7 @@ public void CanRetrieveTheStatusOfANewRepository(bool includeUnaltered)
268268 }
269269
270270 [ Fact ]
271- public void RetrievingTheStatusOfARepositoryReturnNativeFilePaths ( )
271+ public void RetrievingTheStatusOfARepositoryReturnsGitPaths ( )
272272 {
273273 // Build relative path
274274 string relFilePath = Path . Combine ( "directory" , "Testfile.txt" ) ;
@@ -289,7 +289,7 @@ public void RetrievingTheStatusOfARepositoryReturnNativeFilePaths()
289289 Assert . Equal ( 1 , repoStatus . Count ( ) ) ;
290290 StatusEntry statusEntry = repoStatus . Single ( ) ;
291291
292- Assert . Equal ( relFilePath , statusEntry . FilePath ) ;
292+ Assert . Equal ( relFilePath . Replace ( ' \\ ' , '/' ) , statusEntry . FilePath ) ;
293293
294294 Assert . Equal ( statusEntry . FilePath , repoStatus . Added . Select ( s => s . FilePath ) . Single ( ) ) ;
295295 }
@@ -383,6 +383,7 @@ public void RetrievingTheStatusOfTheRepositoryHonorsTheGitIgnoreDirectives()
383383
384384 RepositoryStatus status = repo . RetrieveStatus ( ) ;
385385
386+ relativePath = relativePath . Replace ( '\\ ' , '/' ) ;
386387 Assert . Equal ( new [ ] { relativePath , "new_untracked_file.txt" } , status . Untracked . Select ( s => s . FilePath ) ) ;
387388
388389 Touch ( repo . Info . WorkingDirectory , ".gitignore" , "*.txt" + Environment . NewLine ) ;
@@ -488,8 +489,6 @@ private static void AssertStatus(bool shouldIgnoreCase, FileStatus expectedFileS
488489 [ Fact ]
489490 public void RetrievingTheStatusOfTheRepositoryHonorsTheGitIgnoreDirectivesThroughoutDirectories ( )
490491 {
491- char dirSep = Path . DirectorySeparatorChar ;
492-
493492 string path = SandboxStandardTestRepo ( ) ;
494493 using ( var repo = new Repository ( path ) )
495494 {
@@ -503,7 +502,7 @@ public void RetrievingTheStatusOfTheRepositoryHonorsTheGitIgnoreDirectivesThroug
503502 Assert . Equal ( FileStatus . Ignored , repo . RetrieveStatus ( "bin/what-about-me.txt" ) ) ;
504503
505504 RepositoryStatus newStatus = repo . RetrieveStatus ( new StatusOptions { IncludeIgnored = true } ) ;
506- Assert . Equal ( new [ ] { "bin" + dirSep } , newStatus . Ignored . Select ( s => s . FilePath ) ) ;
505+ Assert . Equal ( new [ ] { "bin/" } , newStatus . Ignored . Select ( s => s . FilePath ) ) ;
507506
508507 var sb = new StringBuilder ( ) ;
509508 sb . AppendLine ( "bin/*" ) ;
@@ -515,8 +514,8 @@ public void RetrievingTheStatusOfTheRepositoryHonorsTheGitIgnoreDirectivesThroug
515514
516515 newStatus = repo . RetrieveStatus ( new StatusOptions { IncludeIgnored = true } ) ;
517516
518- Assert . Equal ( new [ ] { "bin" + dirSep + " look-ma.txt" } , newStatus . Ignored . Select ( s => s . FilePath ) ) ;
519- Assert . True ( newStatus . Untracked . Select ( s => s . FilePath ) . Contains ( "bin" + dirSep + " what-about-me.txt") ) ;
517+ Assert . Equal ( new [ ] { "bin/ look-ma.txt" } , newStatus . Ignored . Select ( s => s . FilePath ) ) ;
518+ Assert . True ( newStatus . Untracked . Select ( s => s . FilePath ) . Contains ( "bin/ what-about-me.txt" ) ) ;
520519 }
521520 }
522521
@@ -630,7 +629,7 @@ public void CanIncludeStatusOfUnalteredFiles()
630629 var path = SandboxStandardTestRepo ( ) ;
631630 string [ ] unalteredPaths = {
632631 "1.txt" ,
633- "1" + Path . DirectorySeparatorChar + " branch_file.txt",
632+ "1/ branch_file.txt" ,
634633 "branch_file.txt" ,
635634 "new.txt" ,
636635 "README" ,
0 commit comments