Skip to content

[Libraries][Android] System.Text.RegularExpressions Edge Cases Fail #56407

Closed

Description

@mdh1418
Test collection for System.Text.RegularExpressions.Tests.RegexGroupTests
System.Text.RegularExpressions.Tests.RegexGroupTests.Groups(cultureName: \"tr-TR\", pattern: \"ı\", input: \"I\", options: IgnoreCase, expectedGroups: [\"I\"])
    Assert.True() Failure\nExpected: True\nActual:   False
System.Text.RegularExpressions.Tests.RegexGroupTests.Groups(cultureName: \"az-Latn-AZ\", pattern: \"ı\", input: \"I\", options: IgnoreCase, expectedGroups: [\"I\"])
    Assert.True() Failure\nExpected: True\nActual:   False

Test collection for System.Text.RegularExpressions.Tests.RegexCultureTests
System.Text.RegularExpressions.Tests.RegexCultureTests.TurkishI_Is_Differently_LowerUpperCased_In_Turkish_Culture(length: 2)
    Assert.All() Failure: 2 out of 2 items in the collection did not pass.\n[1]: Item: Iıİi\n     Xunit.Sdk.FalseException: Assert.False() Failure\n     Expected: False\n     Actual:   True\n        at Xunit.Assert.False(Nullable`1 condition, String userMessage) in xunit.assert.dll:token 0x600000d+0x19\n        at Xunit.Assert.False(Boolean condition) in xunit.assert.dll:token 0x600000a+0x6\n        at System.Text.RegularExpressions.Tests.RegexCultureTests.<>c__DisplayClass2_0.<TurkishI_Is_Differently_LowerUpperCased_In_Turkish_Culture>b__1(Regex rex) in /Users/mdhwang/runtime_droid/src/libraries/System.Text.RegularExpressions/tests/RegexCultureTests.cs:line 90\n        at Xunit.Assert.All[Regex](IEnumerable`1 collection, Action`1 action) in xunit.assert.dll:token 0x6000012+0x28\n[0]: Item: Iıİi\n     Xunit.Sdk.FalseException: Assert.False() Failure\n     Expected: False\n     Actual:   True\n        at Xunit.Assert.False(Nullable`1 condition, String userMessage) in xunit.assert.dll:token 0x600000d+0x19\n        at Xunit.Assert.False(Boolean condition) in xunit.assert.dll:token 0x600000a+0x6\n        at System.Text.RegularExpressions.Tests.RegexCultureTests.<>c__DisplayClass2_0.<TurkishI_Is_Differently_LowerUpperCased_In_Turkish_Culture>b__1(Regex rex) in /Users/mdhwang/runtime_droid/src/libraries/System.Text.RegularExpressions/tests/RegexCultureTests.cs:line 90\n        at Xunit.Assert.All[Regex](IEnumerable`1 collection, Action`1 action) in xunit.assert.dll:token 0x6000012+0x28
System.Text.RegularExpressions.Tests.RegexCultureTests.TurkishI_Is_Differently_LowerUpperCased_In_Turkish_Culture(length: 256)
    Assert.All() Failure: 2 out of 2 items in the collection did not pass.\n[1]: Item: IıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİi\n     Xunit.Sdk.FalseException: Assert.False() Failure\n     Expected: False\n     Actual:   True\n        at Xunit.Assert.False(Nullable`1 condition, String userMessage) in xunit.assert.dll:token 0x600000d+0x19\n        at Xunit.Assert.False(Boolean condition) in xunit.assert.dll:token 0x600000a+0x6\n        at System.Text.RegularExpressions.Tests.RegexCultureTests.<>c__DisplayClass2_0.<TurkishI_Is_Differently_LowerUpperCased_In_Turkish_Culture>b__1(Regex rex) in /Users/mdhwang/runtime_droid/src/libraries/System.Text.RegularExpressions/tests/RegexCultureTests.cs:line 90\n        at Xunit.Assert.All[Regex](IEnumerable`1 collection, Action`1 action) in xunit.assert.dll:token 0x6000012+0x28\n[0]: Item: IıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİiIıİi\n     Xunit.Sdk.FalseException: Assert.False() Failure\n     Expected: False\n     Actual:   True\n        at Xunit.Assert.False(Nullable`1 condition, String userMessage) in xunit.assert.dll:token 0x600000d+0x19\n        at Xunit.Assert.False(Boolean condition) in xunit.assert.dll:token 0x600000a+0x6\n        at System.Text.RegularExpressions.Tests.RegexCultureTests.<>c__DisplayClass2_0.<TurkishI_Is_Differently_LowerUpperCased_In_Turkish_Culture>b__1(Regex rex) in /Users/mdhwang/runtime_droid/src/libraries/System.Text.RegularExpressions/tests/RegexCultureTests.cs:line 90\n        at Xunit.Assert.All[Regex](IEnumerable`1 collection, Action`1 action) in xunit.assert.dll:token 0x6000012+0x28

Branched out from #36848

It looks like the Turkish culture has had some problems with Globalization tests, specifically around the casing of the letters. These seem to be corner cases and it doesn't seem clear exactly what should be done or if the changes should come from the libraries.

For now, moving the tests System.Text.RegularExpressions.Tests.RegexCultureTests.TurkishI_Is_Differently_LowerUpperCased_In_Turkish_Culture and System.Text.RegularExpressions.Tests.RegexGroupTests.Groups to have this as their ActiveIssue instead, and targeting the future milestone.

Activity

  1. added this to the Future milestone on Jul 27, 2021
  2. ghost added
    untriaged
    on Jul 27, 2021
  3. removed
    untriaged
    on Jul 28, 2021
  4. steveisok commented on Jul 30, 2021

    @steveisok
    Member

    Leaving this here as a reminder... We should investigate why tr-TR is problematic on Android and see if we can do anything about it. It's either our test assumptions or the data on the device.

  5. modified the milestones: Future, 7.0.0 on Aug 2, 2021
  6. danmoseley commented on Aug 6, 2021

    @danmoseley
    Contributor

    duping against #37069 as the fix would be the same fix in Android.

  7. ghost locked as resolved and limited conversation to collaborators on Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions