Last modified: 2012-01-16 14:23:56 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T35743, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33743 - phpunit reports identical strings as different
phpunit reports identical strings as different
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-15 20:38 UTC by Amir E. Aharoni
Modified: 2012-01-16 14:23 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
A patch that causes the problem. (2.00 KB, patch)
2012-01-15 20:38 UTC, Amir E. Aharoni
Details

Description Amir E. Aharoni 2012-01-15 20:38:00 UTC
Created attachment 9857 [details]
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:

==========================
4) ParserTests::testParserTest with data set #623 ('Space normalisation on autocomment (bug 22784)', '/* __hello__world__ */', '<a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</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">__hello__world__</span></span>'
+'<a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</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.
Comment 1 Krinkle 2012-01-15 20:41:50 UTC
$wgLang->getDirMark() ?
Comment 2 Antoine "hashar" Musso (WMF) 2012-01-16 09:40:20 UTC
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">__hello__world__</span></span>
+<a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><U+200E><span dir="auto"><span class="autocomment">__hello__world__</span></span>
Comment 3 Sam Reed (reedy) 2012-01-16 14:23:56 UTC
Cheers, that makes sense

U+200E is a LTR mark...

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links