1- // Copyright (c) Toni Solarin-Sodara
1+ // Copyright (c) Toni Solarin-Sodara
22// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33
44using System ;
@@ -34,9 +34,7 @@ public void Dispose()
3434 _disposeAction ? . Invoke ( ) ;
3535 }
3636
37- [ ConditionalFact ]
38- [ SkipOnOS ( OS . Linux ) ]
39- [ SkipOnOS ( OS . MacOS ) ]
37+ [ Fact ]
4038 public void TestCoreLibInstrumentation ( )
4139 {
4240 DirectoryInfo directory = Directory . CreateDirectory ( Path . Combine ( Directory . GetCurrentDirectory ( ) , nameof ( TestCoreLibInstrumentation ) ) ) ;
@@ -55,7 +53,7 @@ public void TestCoreLibInstrumentation()
5553 partialMockFileSystem . CallBase = true ;
5654 partialMockFileSystem . Setup ( fs => fs . OpenRead ( It . IsAny < string > ( ) ) ) . Returns ( ( string path ) =>
5755 {
58- if ( Path . GetFileName ( path ) == files [ 1 ] )
56+ if ( Path . GetFileName ( path . Replace ( @"\" , @"/" ) ) == files [ 1 ] )
5957 {
6058 return File . OpenRead ( Path . Combine ( Path . Combine ( Directory . GetCurrentDirectory ( ) , "TestAssets" ) , files [ 1 ] ) ) ;
6159 }
@@ -66,7 +64,7 @@ public void TestCoreLibInstrumentation()
6664 } ) ;
6765 partialMockFileSystem . Setup ( fs => fs . Exists ( It . IsAny < string > ( ) ) ) . Returns ( ( string path ) =>
6866 {
69- if ( Path . GetFileName ( path ) == files [ 1 ] )
67+ if ( Path . GetFileName ( path . Replace ( @"\" , @"/" ) ) == files [ 1 ] )
7068 {
7169 return File . Exists ( Path . Combine ( Path . Combine ( Directory . GetCurrentDirectory ( ) , "TestAssets" ) , files [ 1 ] ) ) ;
7270 }
@@ -446,9 +444,7 @@ public void SkipEmbeddedPpdbWithoutLocalSource()
446444 loggerMock . VerifyNoOtherCalls ( ) ;
447445 }
448446
449- [ ConditionalFact ]
450- [ SkipOnOS ( OS . MacOS ) ]
451- [ SkipOnOS ( OS . Linux ) ]
447+ [ Fact ]
452448 public void SkipPpdbWithoutLocalSource ( )
453449 {
454450 string dllFileName = "75d9f96508d74def860a568f426ea4a4.dll" ;
@@ -458,7 +454,7 @@ public void SkipPpdbWithoutLocalSource()
458454 partialMockFileSystem . CallBase = true ;
459455 partialMockFileSystem . Setup ( fs => fs . OpenRead ( It . IsAny < string > ( ) ) ) . Returns ( ( string path ) =>
460456 {
461- if ( Path . GetFileName ( path ) == pdbFileName )
457+ if ( Path . GetFileName ( path . Replace ( @"\" , @"/" ) ) == pdbFileName )
462458 {
463459 return File . OpenRead ( Path . Combine ( Path . Combine ( Directory . GetCurrentDirectory ( ) , "TestAssets" ) , pdbFileName ) ) ;
464460 }
@@ -469,7 +465,7 @@ public void SkipPpdbWithoutLocalSource()
469465 } ) ;
470466 partialMockFileSystem . Setup ( fs => fs . Exists ( It . IsAny < string > ( ) ) ) . Returns ( ( string path ) =>
471467 {
472- if ( Path . GetFileName ( path ) == pdbFileName )
468+ if ( Path . GetFileName ( path . Replace ( @"\" , @"/" ) ) == pdbFileName )
473469 {
474470 return File . Exists ( Path . Combine ( Path . Combine ( Directory . GetCurrentDirectory ( ) , "TestAssets" ) , pdbFileName ) ) ;
475471 }
0 commit comments