From 4d3e58d4e176e3095ed1d8958ef79024a9fecdcf Mon Sep 17 00:00:00 2001 From: Prashanth Govindarajan Date: Mon, 26 Oct 2020 11:51:26 -0700 Subject: [PATCH] Skip the unit tests on net framework --- .../tests/Regex.Match.Tests.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/libraries/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs b/src/libraries/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs index ec174720011a2a..a8b319ad27deeb 100644 --- a/src/libraries/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs +++ b/src/libraries/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs @@ -376,7 +376,10 @@ public static IEnumerable Match_Basic_TestData() yield return new object[] { "\u05D0(?:\u05D1|\u05D2|\u05D3)", "\u05D0\u05D2", options, 0, 2, true, "\u05D0\u05D2" }; yield return new object[] { "\u05D0(?:\u05D1|\u05D2|\u05D3)", "\u05D0\u05D4", options, 0, 0, false, "" }; } + } + public static IEnumerable Match_Basic_TestData_NetCore() + { // Unicode symbols in character ranges. These are chars whose lowercase values cannot be found by using the offsets specified in s_lcTable. yield return new object[] { @"^(?i:[\u00D7-\u00D8])$", '\u00F7'.ToString(), RegexOptions.IgnoreCase | RegexOptions.CultureInvariant, 0, 1, false, "" }; yield return new object[] { @"^(?i:[\u00C0-\u00DE])$", '\u00F7'.ToString(), RegexOptions.IgnoreCase | RegexOptions.CultureInvariant, 0, 1, false, "" }; @@ -393,6 +396,14 @@ public static IEnumerable Match_Basic_TestData() yield return new object[] { @"^(?i:[\u24B6-\u24D0])$", ((char)('\u24CF' + 26)).ToString(), RegexOptions.IgnoreCase | RegexOptions.CultureInvariant, 0, 1, true, ((char)('\u24CF' + 26)).ToString() }; } + [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)] + [Theory] + [MemberData(nameof(Match_Basic_TestData_NetCore))] + public void Match_NetCore(string pattern, string input, RegexOptions options, int beginning, int length, bool expectedSuccess, string expectedValue) + { + Match(pattern, input, options, beginning, length, expectedSuccess, expectedValue); + } + [Theory] [MemberData(nameof(Match_Basic_TestData))] [MemberData(nameof(RegexCompilationHelper.TransformRegexOptions), nameof(Match_Basic_TestData), 2, MemberType = typeof(RegexCompilationHelper))]