r94807 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94806‎ | r94807 | r94808 >
Date:20:00, 17 August 2011
Author:wikinaut
Status:resolved (Comments)
Tags:
Comment:
more test cases for highlighter; all pass the test of course
Modified paths:
  • /trunk/phase3/tests/qunit/suites/resources/jquery/jquery.highlightText.test.js (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/qunit/suites/resources/jquery/jquery.highlightText.test.js
@@ -13,15 +13,105 @@
1414 expected: '<span class="highlight">Blue</span> Öyster Cult'
1515 },
1616 {
 17+ text: 'Blue Öyster Cult',
 18+ highlight: 'Blue ',
 19+ expected: '<span class="highlight">Blue</span> Öyster Cult'
 20+ },
 21+ {
 22+ text: 'Blue Öyster Cult',
 23+ highlight: 'Blue Ö',
 24+ expected: '<span class="highlight">Blue</span> <span class="highlight">Ö</span>yster Cult'
 25+ },
 26+ {
 27+ text: 'Blue Öyster Cult',
 28+ highlight: 'Blue Öy',
 29+ expected: '<span class="highlight">Blue</span> <span class="highlight">Öy</span>ster Cult'
 30+ },
 31+ {
 32+ text: 'Blue Öyster Cult',
 33+ highlight: ' Blue',
 34+ expected: '<span class="highlight">Blue</span> Öyster Cult'
 35+ },
 36+ {
 37+ text: 'Blue Öyster Cult',
 38+ highlight: ' Blue ',
 39+ expected: '<span class="highlight">Blue</span> Öyster Cult'
 40+ },
 41+ {
 42+ text: 'Blue Öyster Cult',
 43+ highlight: ' Blue Ö',
 44+ expected: '<span class="highlight">Blue</span> <span class="highlight">Ö</span>yster Cult'
 45+ },
 46+ {
 47+ text: 'Blue Öyster Cult',
 48+ highlight: ' Blue Öy',
 49+ expected: '<span class="highlight">Blue</span> <span class="highlight">Öy</span>ster Cult'
 50+ },
 51+ {
 52+ desc: 'Highlighter broken on starting Umlaut?',
1753 text: 'Österreich',
1854 highlight: 'Österreich',
1955 expected: '<span class="highlight">Österreich</span>'
2056 },
2157 {
22 - desc: 'Highlighter broken on punctuation mark',
 58+ desc: 'Highlighter broken on starting Umlaut?',
 59+ text: 'Österreich',
 60+ highlight: 'Ö',
 61+ expected: '<span class="highlight">Ö</span>sterreich</span>'
 62+ },
 63+ {
 64+ desc: 'Highlighter broken on starting Umlaut?',
 65+ text: 'Österreich',
 66+ highlight: 'Öst',
 67+ expected: '<span class="highlight">Öst</span>erreich'
 68+ },
 69+ {
 70+ desc: 'Highlighter broken on starting Umlaut?',
 71+ text: 'Österreich',
 72+ highlight: 'Oe',
 73+ expected: 'Österreich'
 74+ },
 75+ {
 76+ desc: 'Highlighter broken on punctuation mark?',
2377 text: 'So good. To be there',
2478 highlight: 'good',
2579 expected: 'So <span class="highlight">good</span>. To be there'
 80+ },
 81+ {
 82+ desc: 'Highlighter broken on space?',
 83+ text: 'So good. To be there',
 84+ highlight: 'be',
 85+ expected: 'So good. To <span class="highlight">be</span> there'
 86+ },
 87+ {
 88+ desc: 'Highlighter broken on space?',
 89+ text: 'So good. To be there',
 90+ highlight: ' be',
 91+ expected: 'So good. To <span class="highlight">be</span> there'
 92+ },
 93+ {
 94+ desc: 'Highlighter broken on space?',
 95+ text: 'So good. To be there',
 96+ highlight: 'be ',
 97+ expected: 'So good. To <span class="highlight">be</span> there'
 98+ },
 99+ {
 100+ desc: 'Highlighter broken on space?',
 101+ text: 'So good. To be there',
 102+ highlight: ' be ',
 103+ expected: 'So good. To <span class="highlight">be</span> there'
 104+ },
 105+ {
 106+ desc: 'Highlighter broken on special character at the end?',
 107+ text: 'So good. xbß',
 108+ highlight: 'xbß',
 109+ expected: 'So good. <span class="highlight">xbß</span>'
 110+ },
 111+ {
 112+ desc: 'Highlighter broken on special character at the end?',
 113+ text: 'So good. xbß.',
 114+ highlight: 'xbß.',
 115+ expected: 'So good. <span class="highlight">xbß.</span>'
26116 }
27117 ];
28118 expect(cases.length);

Sign-offs

UserFlagDate
Nikerabbitinspected06:52, 18 August 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r95262follow up to r94807 : more test cases incl. hebrew RTL and Japanese, the test...wikinaut22:15, 22 August 2011

Comments

#Comment by Siebrand (talk | contribs)   16:16, 22 August 2011
#Comment by Wikinaut (talk | contribs)   19:29, 22 August 2011

Argggh, this test case should have failed on _all_ browsers, as the expected result is wrong (it expects 2(!) closing spans which is simply wrong. We need to investigate, why the test suite did not throw errors on that. I will:

- file a correspondig bugzilla - leave the incorrect test case for while (intentionally) - add a correct version of this specifi test case

Thank you for reporting.

#Comment by Wikinaut (talk | contribs)   19:32, 22 August 2011

set to fixme, because one test case is coded with a wrong expexted result. Will be fixed soon today.

#Comment by Wikinaut (talk | contribs)   22:17, 22 August 2011

set to new . see follow up r95262 with longer explanation.

Status & tagging log