@@ -654,8 +654,19 @@ public async Task TestDotNetDetectorNoGlobalJsonSourceRoot()
654654 discoveredComponents . Where ( component => component . Component . Id == "0.0.0 net8.0 unknown - DotNet" ) . Should ( ) . ContainSingle ( ) ;
655655 }
656656
657+ #pragma warning disable SA1201 // Elements should appear in the correct order
658+ private static IEnumerable < object [ ] > AdditionalPathSegments { get ; } =
659+ #pragma warning restore SA1201 // Elements should appear in the correct order
660+ [
661+ [ string . Empty ] ,
662+ [ $ "{ Path . DirectorySeparatorChar } { Path . DirectorySeparatorChar } "] ,
663+ [ $ "{ Path . AltDirectorySeparatorChar } { Path . DirectorySeparatorChar } "] ,
664+ [ $ "{ Path . AltDirectorySeparatorChar } { Path . AltDirectorySeparatorChar } "] ,
665+ ] ;
666+
657667 [ TestMethod ]
658- public async Task TestDotNetDetectorRebasePaths ( )
668+ [ DynamicData ( nameof ( AdditionalPathSegments ) ) ]
669+ public async Task TestDotNetDetectorRebasePaths ( string additionalPathSegment )
659670 {
660671 // DetectorTestUtility runs under Path.GetTempPath()
661672 var scanRoot = Path . TrimEndingDirectorySeparator ( Path . GetTempPath ( ) ) ;
@@ -676,7 +687,7 @@ public async Task TestDotNetDetectorRebasePaths()
676687 this . AddFile ( libraryProjectPath , null ) ;
677688
678689 var libraryOutputPath = Path . Combine ( Path . GetDirectoryName ( libraryProjectPath ) , "obj" ) ;
679- var libraryBuildOutputPath = Path . Combine ( Path . GetDirectoryName ( libraryBuildProjectPath ) , "obj" ) ;
690+ var libraryBuildOutputPath = Path . Combine ( Path . GetDirectoryName ( libraryBuildProjectPath ) , "obj" ) + additionalPathSegment ;
680691 var libraryAssetsPath = Path . Combine ( libraryOutputPath , "project.assets.json" ) ;
681692
682693 // use "build" paths to simulate an Assets file that has a different root. Here the build assets have RootDir, but the scanned filesystem has scanRoot.
0 commit comments