File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
src/tests/FunctionalTests/Android/Device_Emulator/InvariantCultureOnlyMode Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ <Project Sdk =" Microsoft.NET.Sdk" >
2
+ <PropertyGroup >
3
+ <OutputType >Exe</OutputType >
4
+ <MonoForceInterpreter >true</MonoForceInterpreter >
5
+ <RunAOTCompilation >false</RunAOTCompilation >
6
+ <InvariantGlobalization >true</InvariantGlobalization >
7
+ <TestRuntime >true</TestRuntime >
8
+ <TargetFrameworks >$(NetCoreAppCurrent)</TargetFrameworks >
9
+ <MainLibraryFileName >Android.Device_Emulator.InvariantCultureOnlyMode.Test.dll</MainLibraryFileName >
10
+ <IncludesTestRunner >false</IncludesTestRunner >
11
+ <ExpectedExitCode >42</ExpectedExitCode >
12
+ </PropertyGroup >
13
+
14
+ <ItemGroup >
15
+ <Compile Include =" Program.cs" />
16
+ </ItemGroup >
17
+ </Project >
Original file line number Diff line number Diff line change
1
+ // Licensed to the .NET Foundation under one or more agreements.
2
+ // The .NET Foundation licenses this file to you under the MIT license.
3
+
4
+ using System ;
5
+ using System . Globalization ;
6
+
7
+ public static class Program
8
+ {
9
+ public static int Main ( string [ ] args )
10
+ {
11
+ var culture = new CultureInfo ( "es-ES" , false ) ;
12
+ // https://github.com/dotnet/runtime/blob/main/docs/design/features/globalization-invariant-mode.md#cultures-and-culture-data
13
+ int result = culture . LCID == 0x1000 && culture . NativeName == "Invariant Language (Invariant Country)" ? 42 : 1 ;
14
+
15
+ return result ;
16
+ }
17
+ }
You can’t perform that action at this time.
0 commit comments