File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
Common/tests/TestUtilities/System
System.IO.FileSystem/tests Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ public static partial class PlatformDetection
4444 public static bool IsAppleMobile => IsMacCatalyst || IsiOS || IstvOS ;
4545 public static bool IsNotAppleMobile => ! IsAppleMobile ;
4646 public static bool IsNotNetFramework => ! IsNetFramework ;
47+ public static bool IsBsdLike => IsOSXLike || IsFreeBSD || IsNetBSD ;
4748
4849 public static bool IsArmProcess => RuntimeInformation . ProcessArchitecture == Architecture . Arm ;
4950 public static bool IsNotArmProcess => ! IsArmProcess ;
Original file line number Diff line number Diff line change @@ -343,7 +343,7 @@ public void MoveDirectory_NoOpWhenMovingDirectoryWithUpperCaseToOtherDirectoryWi
343343 }
344344
345345 [ Fact ]
346- [ PlatformSpecific ( TestPlatforms . Windows | TestPlatforms . OSX | TestPlatforms . FreeBSD | TestPlatforms . NetBSD ) ]
346+ [ PlatformSpecific ( TestPlatforms . Windows | TestPlatforms . OSX ) ]
347347 public void MoveDirectory_FailToMoveLowerCaseDirectoryWhenUpperCaseDirectoryExists ( )
348348 {
349349 Directory . CreateDirectory ( $ "{ TestDirectory } /bar/FOO") ;
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ private static long GetAllocatedSize(FileStream fileStream)
1515 using var px = Process . Start ( new ProcessStartInfo
1616 {
1717 FileName = "stat" ,
18- ArgumentList = { isOSX ? "-f" : "-c" ,
19- isOSX ? "%b %k" : "%b %B" ,
18+ ArgumentList = { PlatformDetection . IsBsdLike ? "-f" : "-c" ,
19+ PlatformDetection . IsBsdLike ? "%b %k" : "%b %B" ,
2020 fileStream . Name } ,
2121 RedirectStandardOutput = true
2222 } ) ;
You can’t perform that action at this time.
0 commit comments