File tree 3 files changed +7
-2
lines changed
Common/tests/TestUtilities/System
System.Globalization/tests
System.IO.FileSystem/tests/Directory
3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ public static partial class PlatformDetection
48
48
public static bool IsNotArm64Process => ! IsArm64Process ;
49
49
public static bool IsArmOrArm64Process => IsArmProcess || IsArm64Process ;
50
50
public static bool IsNotArmNorArm64Process => ! IsArmOrArm64Process ;
51
+ public static bool IsX86Process => RuntimeInformation . ProcessArchitecture == Architecture . X86 ;
51
52
public static bool IsArgIteratorSupported => IsMonoRuntime || ( IsWindows && IsNotArmProcess ) ;
52
53
public static bool IsArgIteratorNotSupported => ! IsArgIteratorSupported ;
53
54
public static bool Is32BitProcess => IntPtr . Size == 4 ;
Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ namespace System.Globalization.Tests
10
10
public class IcuTests
11
11
{
12
12
private static bool IsIcuCompatiblePlatform => PlatformDetection . IsNotWindows ||
13
- PlatformDetection . IsWindows10Version1903OrGreater ;
13
+ PlatformDetection . IsWindows10Version1903OrGreater &&
14
+ // Server core doesn't have icu.dll on SysWOW64
15
+ ! ( PlatformDetection . IsWindowsServerCore && PlatformDetection . IsX86Process ) ;
14
16
15
17
[ ConditionalFact ( nameof ( IsIcuCompatiblePlatform ) ) ]
16
18
public static void IcuShouldBeUsedByDefault ( )
Original file line number Diff line number Diff line change @@ -270,8 +270,10 @@ public void DirectoryLongerThanMaxLongPathWithExtendedSyntax_ThrowsException()
270
270
{
271
271
var paths = IOInputs . GetPathsLongerThanMaxLongPath ( GetTestFilePath ( ) , useExtendedSyntax : true ) ;
272
272
273
+ // Ideally this should be PathTooLongException or DirectoryNotFoundException but on some machines
274
+ // windows gives us ERROR_INVALID_NAME, producing IOException.
273
275
Assert . All ( paths , path =>
274
- AssertExtensions . ThrowsAny < PathTooLongException , DirectoryNotFoundException > ( ( ) => Create ( path ) ) ) ;
276
+ AssertExtensions . ThrowsAny < PathTooLongException , DirectoryNotFoundException , IOException > ( ( ) => Create ( path ) ) ) ;
275
277
}
276
278
277
279
[ ConditionalFact ( nameof ( LongPathsAreNotBlocked ) , nameof ( UsingNewNormalization ) ) ]
You can’t perform that action at this time.
0 commit comments