Page MenuHomePhabricator

Fix failing unit test.
ClosedPublic

Authored by joshuaspence on Jun 18 2014, 12:01 AM.
Tags
None
Referenced Files
F13811332: D9615.diff
Wed, Sep 18, 3:10 AM
Unknown Object (File)
Sun, Sep 15, 2:21 PM
Unknown Object (File)
Thu, Sep 5, 7:19 PM
Unknown Object (File)
Sun, Aug 25, 3:19 PM
Unknown Object (File)
Wed, Aug 21, 10:10 AM
Unknown Object (File)
Mon, Aug 19, 7:13 AM
Unknown Object (File)
Aug 17 2024, 5:48 AM
Unknown Object (File)
Aug 14 2024, 5:34 AM
Subscribers

Details

Summary

On PHP versions earlier than 5.4.0, \e is not a valid PHP escape character. Consequently, PhutilUTF8TestCase::testUTF8ConsoleStrlen will fail. Replace \e by its hexadecimal equivalent.

Test Plan

Ran unit tests.

Diff Detail

Repository
rPHU libphutil
Branch
utf8-escape
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1205
Build 1205: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

joshuaspence retitled this revision from to Fix failing unit test..
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added reviewers: epriestley, hach-que.
hach-que edited edge metadata.

Confirmed this fixes the issue.

epriestley edited edge metadata.

Maybe swap the \e in phutil_utf8_console_strlen() just for clarity? It must be getting interpreted consistently by PCRE, but it might be clearer to use an escape byte explicitly (e.g., no one will copy/paste it and run into this issue at some point in the fuutre).

This revision is now accepted and ready to land.Jun 18 2014, 12:12 AM