File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,10 +45,14 @@ public void TestDefaultLayout()
4545 Directory . SetCurrentDirectory ( tmpDir ) ;
4646 if ( RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) )
4747 {
48- // `Directory.SetCurrentDirectory()` doesn't seem to work on macOS,
49- // so disable this test on macOS, for now
48+ // `Directory.SetCurrentDirectory()` seems to slightly change the path on macOS,
49+ // so adjusting it:
5050 Assert . NotEqual ( Directory . GetCurrentDirectory ( ) , tmpDir ) ;
51- return ;
51+ tmpDir = "/private" + tmpDir ;
52+ // Remove trailing slash:
53+ Assert . Equal ( '/' , tmpDir [ tmpDir . Length - 1 ] ) ;
54+ tmpDir = tmpDir . Substring ( 0 , tmpDir . Length - 1 ) ;
55+ Assert . Equal ( Directory . GetCurrentDirectory ( ) , tmpDir ) ;
5256 }
5357 var f1 = project ! . GetTrapPath ( Logger , new TransformedPathStub ( "foo.cs" ) , TrapWriter . CompressionMode . Gzip ) ;
5458 var g1 = TrapWriter . NestPaths ( Logger , tmpDir , "foo.cs.trap.gz" ) ;
You can’t perform that action at this time.
0 commit comments