提交 1d352e6f 编写于 作者: P Petr Onderka

IsEnglishLocal checks CurrentCulture and CurrentUICulture

Since some skipped tests require en culture and others require en UI culture,
this ensures both groups are skipped when at least one of them is not en.
上级 2316dd86
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Globalization;
using System.Text;
using Xunit;
......@@ -45,9 +46,10 @@ public class HasShiftJisDefaultEncoding : ExecutionCondition
public class IsEnglishLocal : ExecutionCondition
{
public override bool ShouldSkip =>
!System.Globalization.CultureInfo.CurrentUICulture.Name.StartsWith("en", StringComparison.OrdinalIgnoreCase);
!CultureInfo.CurrentUICulture.Name.StartsWith("en", StringComparison.OrdinalIgnoreCase) ||
!CultureInfo.CurrentCulture.Name.StartsWith("en", StringComparison.OrdinalIgnoreCase);
public override string SkipReason => "Current culture is not en-US";
public override string SkipReason => "Current culture is not en";
}
public class IsRelease : ExecutionCondition
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册