Page MenuHomePhabricator

phpunit reports identical strings as different
Closed, DeclinedPublic

Description

A patch that causes the problem.

I'm sorry about the few details in the description.

I made the changes in the attached patch in my tree (the patch is supposed to address in r107365). I ran "php phpunit.php" and received the following error:

  1. ParserTests::testParserTest with data set #623 ('Space normalisation on autocomment (bug 22784)', '/* helloworld__ */', '<a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">helloworld__</span></span>', 'comment

title=[[Main Page]]', '')
Space normalisation on autocomment (bug 22784)
Failed asserting that two strings are equal.

  • Expected

+++ Actual
@@ @@
-'<a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">helloworld__</span></span>'

+'<a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">helloworld__</span></span>'

It seems like the strings are the same, but they are reported as different.

Other changed tests were reported as failing for the same reason, too.

Reedy suggested opening a bug.


Version: unspecified
Severity: normal

Attached:

Details

Reference
bz33743
ReferenceSource BranchDest BranchAuthorTitle
repos/releng/gitlab-trusted-runner!65main-I4c51110127418630d6539fa9355bc8038514a71cmaindancyAdd dataset config store project to trusted runners
repos/releng/gitlab-trusted-runner!64mainmaintchinAdd dataset config store project to trusted runners
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:01 AM
bzimport set Reference to bz33743.
bzimport added a subscriber: Unknown Object (MLST).

pipe the output of parserTests.php to less, that would sometime reveal unwritablel characters

In this case there is a <U+200E> char between </a> and <span

-<a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">helloworld</span></span>
+<a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><U+200E><span dir="auto"><span class="autocomment">
helloworld</span></span>

Cheers, that makes sense

U+200E is a LTR mark...