Honor UI language override in test runs

Also fix some incorrect unlocalized test expectations that slipped in.
This commit is contained in:
Nick Guerrera 2017-07-18 08:34:08 -07:00
parent 60e2637143
commit a1c423c0f6
6 changed files with 28 additions and 11 deletions

View file

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
@ -23,6 +24,15 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
private TempRoot _temp;
private static TestAssets s_testAssets;
static TestBase()
{
// set culture of test process to match CLI sub-processes when the UI language is overriden.
string overriddenUILanguage = Environment.GetEnvironmentVariable("DOTNET_CLI_UI_LANGUAGE");
if (overriddenUILanguage != null)
{
CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo(overriddenUILanguage);
}
}
protected static string RepoRoot
{