Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[String] Unexpected codepoints in tests #38957

Copy link
Copy link
Closed
@derrabus

Description

@derrabus
Issue body actions

Symfony version(s) affected: 5.1-dev

Description
When running test String test suite on macOS, the tests fail because they receive more codepoints than expected.

How to reproduce
Run the String test suite on macOS.

Additional context
Discovered while working on #38620

https://github.com/symfony/symfony/pull/38956/checks?check_run_id=1339604533#step:8:1216

There were 3 failures:

1) Symfony\Component\String\Tests\UnicodeStringTest::testCodePointsAt with data set #8 (array(2360, 2381), 'नमस्ते', 2)
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
 Array &0 (
     0 => 2360
     1 => 2381
+    2 => 2340
+    3 => 2375
 )

/Users/runner/work/symfony/symfony/src/Symfony/Component/String/Tests/AbstractUnicodeTestCase.php:56

2) Symfony\Component\String\Tests\UnicodeStringTest::testBytesAt with data set #8 (array(224, 164, 184, 224, 165, 141), 'नमस्ते', 2)
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
     3 => 224
     4 => 165
     5 => 141
+    6 => 224
+    7 => 164
+    8 => 164
+    9 => 224
+    10 => 165
+    11 => 135
 )

/Users/runner/work/symfony/symfony/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php:45

3) Symfony\Component\String\Tests\UnicodeStringTest::testLength with data set #9 (5, 'अनुच्छेद')
Failed asserting that 4 is identical to 5.

/Users/runner/work/symfony/symfony/src/Symfony/Component/String/Tests/AbstractAsciiTestCase.php:165

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.