Index: trunk/phase3/tests/qunit/suites/resources/jquery/jquery.highlightText.test.js |
— | — | @@ -13,15 +13,105 @@ |
14 | 14 | expected: '<span class="highlight">Blue</span> Öyster Cult' |
15 | 15 | }, |
16 | 16 | { |
| 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?', |
17 | 53 | text: 'Österreich', |
18 | 54 | highlight: 'Österreich', |
19 | 55 | expected: '<span class="highlight">Österreich</span>' |
20 | 56 | }, |
21 | 57 | { |
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?', |
23 | 77 | text: 'So good. To be there', |
24 | 78 | highlight: 'good', |
25 | 79 | 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>' |
26 | 116 | } |
27 | 117 | ]; |
28 | 118 | expect(cases.length); |