From: Thomas Gries Date: Mon, 22 Aug 2011 22:15:43 +0000 (+0000) Subject: follow up to r94807 : more test cases incl. hebrew RTL and Japanese, the test cases... X-Git-Tag: 1.31.0-rc.0~28130 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=81b60e315f0ef233d8e773cf89c77a8eb18c4ae9;p=lhc%2Fweb%2Fwiklou.git follow up to r94807 : more test cases incl. hebrew RTL and Japanese, the test cases 100 and 101 have been intentionally added with wrong expected result. It shows that the current qunit software may have problems with wrong double closing span tags. test cases 100 and 101 fail *correctly* on internet explorer 8.0, but with Firefox 6.0 and Chrome no errors are detected --- false negative with Firefox and Chrome and maybe other browsers --- diff --git a/tests/qunit/suites/resources/jquery/jquery.highlightText.test.js b/tests/qunit/suites/resources/jquery/jquery.highlightText.test.js index 5b1d5f8b06..468c806bfc 100644 --- a/tests/qunit/suites/resources/jquery/jquery.highlightText.test.js +++ b/tests/qunit/suites/resources/jquery/jquery.highlightText.test.js @@ -8,110 +8,154 @@ test( '-- Initial check', function() { test( 'Check', function() { var cases = [ { + desc: 'Test 001', text: 'Blue Öyster Cult', highlight: 'Blue', expected: 'Blue Öyster Cult' }, { + desc: 'Test 002', text: 'Blue Öyster Cult', highlight: 'Blue ', expected: 'Blue Öyster Cult' }, { + desc: 'Test 003', text: 'Blue Öyster Cult', highlight: 'Blue Ö', expected: 'Blue Öyster Cult' }, { + desc: 'Test 004', text: 'Blue Öyster Cult', highlight: 'Blue Öy', expected: 'Blue Öyster Cult' }, { + desc: 'Test 005', text: 'Blue Öyster Cult', highlight: ' Blue', expected: 'Blue Öyster Cult' }, { + desc: 'Test 006', text: 'Blue Öyster Cult', highlight: ' Blue ', expected: 'Blue Öyster Cult' }, { + desc: 'Test 007', text: 'Blue Öyster Cult', highlight: ' Blue Ö', expected: 'Blue Öyster Cult' }, { + desc: 'Test 008', text: 'Blue Öyster Cult', highlight: ' Blue Öy', expected: 'Blue Öyster Cult' }, { - desc: 'Highlighter broken on starting Umlaut?', + desc: 'Test 009: Highlighter broken on starting Umlaut?', text: 'Österreich', highlight: 'Österreich', expected: 'Österreich' }, { - desc: 'Highlighter broken on starting Umlaut?', + desc: 'Test 010: Highlighter broken on starting Umlaut?', text: 'Österreich', highlight: 'Ö', - expected: 'Österreich' + expected: 'Österreich' }, { - desc: 'Highlighter broken on starting Umlaut?', + desc: 'Test 011: Highlighter broken on starting Umlaut?', text: 'Österreich', highlight: 'Öst', expected: 'Österreich' }, { - desc: 'Highlighter broken on starting Umlaut?', + desc: 'Test 012: Highlighter broken on starting Umlaut?', text: 'Österreich', highlight: 'Oe', expected: 'Österreich' }, { - desc: 'Highlighter broken on punctuation mark?', + desc: 'Test 013: Highlighter broken on punctuation mark?', text: 'So good. To be there', highlight: 'good', expected: 'So good. To be there' }, { - desc: 'Highlighter broken on space?', + desc: 'Test 014: Highlighter broken on space?', text: 'So good. To be there', highlight: 'be', expected: 'So good. To be there' }, { - desc: 'Highlighter broken on space?', + desc: 'Test 015: Highlighter broken on space?', text: 'So good. To be there', highlight: ' be', expected: 'So good. To be there' }, { - desc: 'Highlighter broken on space?', + desc: 'Test 016: Highlighter broken on space?', text: 'So good. To be there', highlight: 'be ', expected: 'So good. To be there' }, { - desc: 'Highlighter broken on space?', + desc: 'Test 017: Highlighter broken on space?', text: 'So good. To be there', highlight: ' be ', expected: 'So good. To be there' }, { - desc: 'Highlighter broken on special character at the end?', + desc: 'Test 018: Highlighter broken on special character at the end?', text: 'So good. xbß', highlight: 'xbß', expected: 'So good. xbß' }, { - desc: 'Highlighter broken on special character at the end?', + desc: 'Test 019: Highlighter broken on special character at the end?', text: 'So good. xbß.', highlight: 'xbß.', expected: 'So good. xbß.' + }, + { + desc: 'Test 020: Hebrew', + text: 'חסיד אומות העולם', + highlight: 'חסיד אומות העולם', + expected: 'חסיד אומות העולם' + }, + { + desc: 'Test 021: Hebrew', + text: 'חסיד אומות העולם', + highlight: 'חסי', + expected: 'חסיד אומות העולם' + }, + { + desc: 'Test 022: Japanese', + text: '諸国民の中の正義の人', + highlight: '諸国民の中の正義の人', + expected: '諸国民の中の正義の人' + }, + { + desc: 'Test 023: Japanese', + text: '諸国民の中の正義の人', + highlight: '諸国', + expected: '諸国民の中の正義の人' + }, + { + desc: 'Test 100: TESTCASE FOR QUNIT FAILS: a wrong expected string was not detected in Firefox 6.0 and Chrome', + text: 'Österreich', + highlight: 'Ö', + expected: 'Österreich' + }, + { + desc: 'Test 101: TESTCASE FOR QUNIT FAILS: a wrong expected string was not detected in Firefox 6.0 or Chrome', + text: 'Oesterreich', + highlight: 'Oe', + expected: 'Oesterreich' } ]; expect(cases.length);